Skip to content

Conversation

@AbhiPrasad
Copy link
Member

fixes #6807

Set baggage even when there is no active transaction. We do this because we are responsible for propagating baggage via the W3CBaggagePropagator which the SentryPropagator inherits from.

@AbhiPrasad AbhiPrasad requested review from lforst and mydea January 17, 2023 10:58
public constructor() {
addGlobalEventProcessor(event => {
const otelSpan = trace.getActiveSpan() as OtelSpan;
const otelSpan = trace && trace.getActiveSpan && (trace.getActiveSpan() as OtelSpan | undefined);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snuck this change in as it seems that getActiveSpan is not defined for some versions - will investigate more but at least this unhandled errors in production.

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.82 KB (+0.01% 🔺)
@sentry/browser - ES5 CDN Bundle (minified) 61.47 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.5 KB (+0.02% 🔺)
@sentry/browser - ES6 CDN Bundle (minified) 54.77 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.22 KB (0%)
@sentry/browser - Webpack (minified) 66.17 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.24 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.51 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.73 KB (-0.02% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.02 KB (+0.02% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.12 KB (-0.82% 🔽)
@sentry/replay - Webpack (gzipped + minified) 38.45 KB (-0.99% 🔽)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.35 KB (-0.6% 🔽)

@AbhiPrasad AbhiPrasad merged commit 952d866 into master Jan 17, 2023
@AbhiPrasad AbhiPrasad deleted the abhi-redefine-baggage branch January 17, 2023 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OTEL] Make sure we propagate baggage correctly

3 participants