Skip to content

Discern Client vs Server Errors #85732

Closed
Closed

Description

@smeubank

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).

PRs

Activity

  1. mydea commented on Mar 24, 2025

    @mydea
    Member

    Also see #87697

  2. self-assigned this
    on Mar 25, 2025
  3. timfish commented on Apr 11, 2025

    @timfish
    Contributor

    Maybe you can determine this from the platform property in the event.
    It's should be node for backend and javascript for frontend.

    The develop docs already say:

    A string representing the platform the SDK is submitting from. This will be
    used by the Sentry interface to customize various components in the interface.

    This would also be helpful for the Electron SDK since that also has events from both.

  4. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 11, 2025
  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Apr 14, 2025
  6. s1gr1d commented on Apr 14, 2025

    @s1gr1d
    Member

    It's should be node for backend and javascript for frontend.

    That's correct for the most cases but e.g. Deno is considered javascript, but it's on the backend.

  7. s1gr1d commented on Apr 14, 2025

    @s1gr1d
    Member

    Linking this issue, as it came up during development: #89470

    It's about showing the cloud platform in the highlights as well.

  8. s1gr1d commented on May 22, 2025

    @s1gr1d
    Member

    Closing this as this is done in the issue details view.

    Discerning errors in the issue feed is tracked here: #89841

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions