Skip to content

Conversation

@codyde
Copy link
Contributor

@codyde codyde commented Mar 28, 2025

DESCRIBE YOUR PR

Simplifying initial trace propagation example to not use a regex based example. Creates a more gradual increase in complexity through the other examples.

Added a callout that for services running on different ports on the same origin.

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • None: Not urgent, can wait up to 1 week+

@vercel
Copy link

vercel bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 31, 2025 5:05am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Mar 31, 2025 5:05am
develop-docs ⬜️ Ignored (Inspect) Visit Preview Mar 31, 2025 5:05am

@codyde codyde changed the title Simplifying Trace Propagation Examples; Adding localhost callout. Simplifying Trace Propagation Examples; Adding origin callout. Mar 28, 2025
@codecov
Copy link

codecov bot commented Mar 28, 2025

Bundle Report

Changes will decrease total bundle size by 15 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.6MB -9 bytes (-0.0%) ⬇️
sentry-docs-client-array-push 9.43MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.58MB -0.0%
../instrumentation.js -3 bytes 910.48kB -0.0%
9523.js -3 bytes 886.53kB -0.0%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 869.5kB -0.0%
static/chunks/4741-*.js -3 bytes 394.85kB -0.0%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
server/middleware-*.js -5.55kB 1.0kB -84.74%
static/6e6sv9g2wU3zAMBhJWmBF/_buildManifest.js (New) 578 bytes 578 bytes 100.0% 🚀
static/6e6sv9g2wU3zAMBhJWmBF/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/RM9RW3Qo3h-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
static/RM9RW3Qo3h-*.js (Deleted) -578 bytes 0 bytes -100.0% 🗑️


Note: port numbers are relevant for trace propagation and the origin. You may need to configure the `tracePropagationTargets` to ensure that traces are propagated across your services if they run on different ports.

For example, if you have a Vite frontend running on `http://localhost:5173` and a Bun backend running on `http://localhost:3000`, both `http://localhost:5173` and `http://localhost:3000` should be added to the `tracePropagationTargets` array.
Copy link
Member

Choose a reason for hiding this comment

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

Hmm this is not correct I believe, you do not need to add your frontend as traceProapgationTargets as you'll usually not make API requests to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup - you're absolutely correct, I have a fix pushed up for this. I kept with the previous examples that had localhost in them - but its not entirely useful or needed. Thanks for catching.


When you are interacting with other external API systems, you might have to define `tracePropagationTargets` to get around possible [Browser CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) issues.

<Alert>
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like this 'Alert' block is being used in several places with identical content, it's probably worth creating an include to simplify the maintenance of this content. This can totally be done in a follow-up PR if you want to merge this first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, definitely. Ill refactor it to include it short term, just to keep things clean, before merging.

Copy link
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

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

🛳️

@codyde codyde merged commit f4caca0 into master Mar 31, 2025
11 checks passed
@codyde codyde deleted the codyde-simplyfing-trace-propagation-example branch March 31, 2025 16:41
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants