Skip to content

feat(opentelemetry): Ignore propagation context when not continuing trace #14409

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

mydea
Copy link
Member

@mydea mydea commented Nov 21, 2024

Let's see how that would even work...

Implements changes on top of #14426

Copy link
Contributor

github-actions bot commented Nov 21, 2024

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 23.01 KB - -
@sentry/browser - with treeshaking flags 21.72 KB - -
@sentry/browser (incl. Tracing) 35.62 KB - -
@sentry/browser (incl. Tracing, Replay) 72.4 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.69 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 76.7 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.17 KB - -
@sentry/browser (incl. Feedback) 39.75 KB - -
@sentry/browser (incl. sendFeedback) 27.64 KB - -
@sentry/browser (incl. FeedbackAsync) 32.43 KB - -
@sentry/react 25.71 KB - -
@sentry/react (incl. Tracing) 38.48 KB - -
@sentry/vue 27.2 KB - -
@sentry/vue (incl. Tracing) 37.43 KB - -
@sentry/svelte 23.18 KB - -
CDN Bundle 24.18 KB - -
CDN Bundle (incl. Tracing) 37.19 KB - -
CDN Bundle (incl. Tracing, Replay) 71.95 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 77.3 KB - -
CDN Bundle - uncompressed 71.15 KB - -
CDN Bundle (incl. Tracing) - uncompressed 110.55 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 223.35 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 236.57 KB - -
@sentry/nextjs (client) 38.7 KB - -
@sentry/sveltekit (client) 36.13 KB - -
@sentry/node 134.62 KB -0.01% -12 B 🔽
@sentry/node - without tracing 96.45 KB -0.02% -15 B 🔽
@sentry/aws-serverless 106.68 KB -0.02% -13 B 🔽

View base workflow run

Copy link

codecov bot commented Nov 21, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
207 1 206 6
View the top 1 failed tests by shortest run time
transactions.test.ts Sends an API route transaction to OTLP
Stack Traces | 4.85s run time
transactions.test.ts:4:5 Sends an API route transaction to OTLP

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

@mydea mydea closed this Nov 22, 2024
@mydea mydea reopened this Nov 22, 2024
@mydea mydea changed the base branch from develop to fn/test-no-incoming-trace November 22, 2024 08:52
@mydea mydea force-pushed the fn/ignore-propagation-context-without-incoming branch from 6cf8609 to 28fbde8 Compare November 22, 2024 08:52
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Something I noticed but not 100% sure if problematic:

Our startNewTrace API recycles the propagation context and doesn't set a parent span. So I guess in that case, we'd not take the traceId created from startNewTrace but create yet another one? Probably that's even fine but it kinda questions the existance of startNewTrace, right? 😅

Oh I guess it still makes sense when you want to actively start a new trace while there is an active span 🤔

Base automatically changed from fn/test-no-incoming-trace to develop November 25, 2024 08:06
@mydea
Copy link
Member Author

mydea commented Nov 25, 2024

Something I noticed but not 100% sure if problematic:

Our startNewTrace API recycles the propagation context and doesn't set a parent span. So I guess in that case, we'd not take the traceId created from startNewTrace but create yet another one? Probably that's even fine but it kinda questions the existance of startNewTrace, right? 😅

Oh I guess it still makes sense when you want to actively start a new trace while there is an active span 🤔

hmm yeah true! But I guess this is still fine in so far as generatePropagationContext() would basically just mean "ignore this propagation context", kind of 🤔 Since the traceId and spanId in there are random anyhow, it should not really matter if we use this or another one, but.... 🤔

@mydea mydea force-pushed the fn/ignore-propagation-context-without-incoming branch from 28fbde8 to 0ae5a19 Compare November 25, 2024 08:13
@mydea mydea force-pushed the fn/ignore-propagation-context-without-incoming branch from 0ae5a19 to 303a7a0 Compare November 25, 2024 12:33
@mydea mydea closed this Nov 26, 2024
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.

2 participants