Skip to content

Indicate browser/node/edge runtime for events #87697

Closed as duplicate
Closed as duplicate

Description

@mydea

For meta frameworks like Next.js (but not only, also e.g. Remix, Nuxt, Sveltekit, SolidStart), all issues come into a single project. This includes browser (client) issues/transactions, but also server (node or vercel-edge) issues/transactions.

Today, it is very hard to see where an event is coming from. Really, you have to manually look at a bunch of rather obscure event data to figure this out. We should highlight this better for our users!

  1. We should show the runtime of the event (issue/transaction) somewhere on the top of the issue detail page.
  2. We should show the runtime of the event in the issue stream.
  3. We should probably do this for all JavaScript meta SDKs (but not all SDKs, as it is redundant information if I only have e.g. a React app)

Some notes on implementation/event structure:

How can we identify if an event comes from a meta SDK?

A pretty reliable way is to look at sdk.packages in the event. If this has more than one entry, it can be considered a meta SDK that covers more than one runtime. E.g. for Next.js this will be one of:

[
  {
    "name": "npm:@sentry/nextjs",
    "version": "8.29.0"
  },
  {
    // or @sentry/react, or @sentry/vercel-edge
    "name": "npm:@sentry/node",
    "version": "8.29.0"
  }
]

Where can I get the runtime information from?

This is a bit tricky as we do not really have a central place for this. The easiest heuristic is to look at contexts.runtime.name. This would be node or vercel-edge, respectively. If this is not set, it can be considered browser.

Alternatively, you could look at the sdk.packages (but this is a bit tricky as it may include e.g. @sentry/react or @sentry/vue or @sentry/browser).

Activity

  1. mydea commented on Mar 24, 2025

    @mydea
    MemberAuthor

    Duplicate of #85732

  2. locked and limited conversation to collaborators on Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions