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 19b2e9a commit 3ecf73eCopy full SHA for 3ecf73e
packages/opentelemetry/src/spanExporter.ts
@@ -126,9 +126,14 @@ export class SentrySpanExporter {
126
127
/** Try to flush any pending spans immediately. */
128
public flush(): void {
129
- const finishedSpans: ReadableSpan[] = this._finishedSpanBuckets.flatMap(bucket =>
130
- bucket ? Array.from(bucket.spans) : [],
131
- );
+const finishedSpans: ReadableSpan[] = [];
+for (const bucket of this._finishedSpanBuckets) {
+ if (bucket) {
132
+ for (const span of bucket.spans) {
133
+ finishedSpans.push(span);
134
+ }
135
136
+}
137
138
this._flushSentSpanCache();
139
const sentSpans = this._maybeSend(finishedSpans);
0 commit comments