File tree
Expand file treeCollapse file tree1 file changed
+8
-3
lines changed packages/opentelemetry/src
Expand file treeCollapse file tree1 file changed
+8
-3
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -126,9 +126,14 @@ export class SentrySpanExporter {
|
126 | 126 |
|
127 | 127 | /** Try to flush any pending spans immediately. */
|
128 | 128 | public flush(): void {
|
129 |
| -const finishedSpans: ReadableSpan[] = this._finishedSpanBuckets.flatMap(bucket => |
130 |
| -bucket ? Array.from(bucket.spans) : [], |
131 |
| -); |
| 129 | +const finishedSpans: ReadableSpan[] = []; |
| 130 | +for (const bucket of this._finishedSpanBuckets) { |
| 131 | +if (bucket) { |
| 132 | +for (const span of bucket.spans) { |
| 133 | +finishedSpans.push(span); |
| 134 | +} |
| 135 | +} |
| 136 | +} |
132 | 137 |
|
133 | 138 | this._flushSentSpanCache();
|
134 | 139 | const sentSpans = this._maybeSend(finishedSpans);
|
|
You can’t perform that action at this time.
0 commit comments