We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3688841 commit dda6ee6Copy full SHA for dda6ee6
packages/opentelemetry/src/utils/getTraceData.ts
@@ -7,16 +7,9 @@ import { dropUndefinedKeys } from '@sentry/utils';
7
* @see `@sentry/core` version of `getTraceData` for more information
8
*/
9
export function getTraceData(): SerializedTraceData {
10
- const context = api.context.active();
11
-
12
- // This should never happen, given we always create an ambient non-recording span if there's no active span.
13
- if (!context) {
14
- return {};
15
- }
16
17
const headersObject: Record<string, string> = {};
18
19
- api.propagation.inject(context, headersObject);
+ api.propagation.inject(api.context.active(), headersObject);
20
21
if (!headersObject['sentry-trace']) {
22
return {};
0 commit comments