|
1 | 1 | import { context, trace, TraceFlags } from '@opentelemetry/api'; |
2 | | -import type { SpanProcessor } from '@opentelemetry/sdk-trace-base'; |
3 | 2 | import type { TransactionEvent } from '@sentry/core'; |
4 | 3 | import { debug, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core'; |
5 | | -import { SentrySpanProcessor } from '@sentry/opentelemetry'; |
6 | 4 | import { afterEach, describe, expect, it, vi } from 'vitest'; |
7 | 5 | import * as Sentry from '../../src'; |
8 | | -import { cleanupOtel, getProvider, mockSdkInit } from '../helpers/mockSdkInit'; |
| 6 | +import { cleanupOtel, getSpanProcessor, mockSdkInit } from '../helpers/mockSdkInit'; |
9 | 7 |
|
10 | 8 | describe('Integration | Transactions', () => { |
11 | 9 | afterEach(() => { |
@@ -562,13 +560,7 @@ describe('Integration | Transactions', () => { |
562 | 560 |
|
563 | 561 | mockSdkInit({ tracesSampleRate: 1, beforeSendTransaction }); |
564 | 562 |
|
565 | | - const provider = getProvider(); |
566 | | - const multiSpanProcessor = provider?.activeSpanProcessor as |
567 | | - | (SpanProcessor & { _spanProcessors?: SpanProcessor[] }) |
568 | | - | undefined; |
569 | | - const spanProcessor = multiSpanProcessor?.['_spanProcessors']?.find( |
570 | | - spanProcessor => spanProcessor instanceof SentrySpanProcessor, |
571 | | - ) as SentrySpanProcessor | undefined; |
| 563 | + const spanProcessor = getSpanProcessor(); |
572 | 564 |
|
573 | 565 | const exporter = spanProcessor ? spanProcessor['_exporter'] : undefined; |
574 | 566 |
|
|
0 commit comments