Skip to content

Commit

Permalink
fix: use RawID in traceRPCMeta to avoid allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan authored and vyzo committed Jan 23, 2022
1 parent 9fbf906 commit f9b2412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ func (t *pubsubTracer) traceRPCMeta(rpc *RPC) *pb.TraceEvent_RPCMeta {
var msgs []*pb.TraceEvent_MessageMeta
for _, m := range rpc.Publish {
msgs = append(msgs, &pb.TraceEvent_MessageMeta{
MessageID: []byte(t.idGen.ID(&Message{Message: m})),
MessageID: []byte(t.idGen.RawID(m)),
Topic: m.Topic,
})
}
Expand Down

0 comments on commit f9b2412

Please sign in to comment.