We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40cf125 commit 7aec711Copy full SHA for 7aec711
pubsub/topic.go
@@ -1086,11 +1086,15 @@ func (t *Topic) initBundler() {
1086
for _, m := range bmsgs {
1087
m.batcherSpan.End()
1088
m.createSpan.AddEvent(eventPublishStart, trace.WithAttributes(semconv.MessagingBatchMessageCount(len(bmsgs))))
1089
- defer m.createSpan.End()
1090
- defer m.createSpan.AddEvent(eventPublishEnd)
1091
}
1092
1093
t.publishMessageBundle(ctx, bmsgs)
+ if t.enableTracing {
+ for _, m := range bmsgs {
1094
+ m.createSpan.AddEvent(eventPublishEnd)
1095
+ m.createSpan.End()
1096
+ }
1097
1098
})
1099
t.scheduler.DelayThreshold = t.PublishSettings.DelayThreshold
1100
t.scheduler.BundleCountThreshold = t.PublishSettings.CountThreshold
0 commit comments