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 committed Jan 22, 2022
1 parent 775cda4 commit fbb9a6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trace.go
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 fbb9a6d

Please sign in to comment.