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 91ebe73 commit 57b9c6fCopy full SHA for 57b9c6f
src/publisher/message-queues.ts
@@ -173,12 +173,15 @@ export abstract class MessageQueue extends EventEmitter {
173
throw e;
174
} finally {
175
messages.forEach(m => {
176
- // We're finished with both the RPC and the whole publish operation,
177
- // so close out all of the related spans.
178
- rpcSpan?.end();
179
tracing.PubsubEvents.publishEnd(m);
180
- m.parentSpan?.end();
181
});
+
+ // We're finished with both the RPC and the whole publish operation,
+ // so close out all of the related spans.
+ new Set(messages.map(m => m.parentSpan)).forEach(parentSpan => {
182
+ parentSpan?.end();
183
+ });
184
+ rpcSpan?.end();
185
}
186
187
0 commit comments