Skip to content

Add getTracingMetaTags helper function to Node SDK #8843

@Lms24

Description

@Lms24

Problem Statement

Sentry's browser SDKs pick up <meta name="sentry-trace" .../> and <meta name="baggage" /> tags in a users' HTML when starting the initial pageload transaction. This is how SSR transactions can be connected to their frontend pageload transactions. We use this mechanism internally in our Full-Stack framework SDKs (NextJS, Remix, SvelteKit) but also users can add this to their own SSR setup.

Right now, this feature is neither well documented nor easy to use on the server side.

One use case for the Node SDK: An express app using our Node SDK that renders HTML pages.

### Tasks
- [x] Add a helper function that renders the Meta tags to a string that users can simply call and then include in their HTML.
- [ ] https://github.com/getsentry/sentry-docs/issues/7671

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions