Replies: 1 comment 12 replies
-
To enable distributed tracing from backend -> frontend, you'll need to set meta tags as per the linked docs in your HTML somewhere. On the client-side, the SDK via the We need to add a Node.js example in the docs of how to generate these meta tags, but you can see Python as an example. Here's how we do it in the SvelteKit SDK: sentry-javascript/packages/sveltekit/src/server/handle.ts Lines 67 to 71 in 72c3488 So in your vike server router, when generating html, you'll need to add those meta tags ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The flow is:
At the moment, traces are not able to make the connection between the original server requests and later client requests.
We using Node.js server-side.
We are using React/Vike framework client-side.
I can do something like this server-side to pass down trace/span to the client:
But how do I instrument React integration to use these attributes for the requests that occur before first-client side navigation happens?
https://docs.sentry.io/platforms/javascript/guides/react/usage/distributed-tracing/custom-instrumentation/?original_referrer=https%3A%2F%2Fwww.google.com%2F
Okay, so based on this, I need to expose
sentry-trace
andbaggage
. I am assuming this is still true if I am using OpenTelemetry?Would be nice to show in documentation how to get these values in Node.js.
As far as I understand from reading the docs, I don't need baggage. Just trace ID and span ID.
But how do I pass this to client and how do I instrument a custom router (Vike), still remains a mystery.
Looks like we need something similar to this in Vike
https://github.com/getsentry/sentry-javascript/blob/develop/packages/react/src/reactrouterv6.tsx
instrumentRoutingWithDefaults
provides a rough idea how to implement thissentry-javascript/packages/tracing-internal/src/browser/router.ts
Line 10 in 72c3488
Beta Was this translation helpful? Give feedback.
All reactions