Skip to content

Implement a hybrid approach to for tool identification in source map uploads #704

Open
@priscilawebdev

Description

@priscilawebdev

Problem
Right now, our product doesn’t know which tool was used to upload source maps. This is important because different tools, like Webpack, Vite Plugin, or Sentry CLI, can have different configurations that affect how source maps are uploaded. Without knowing the tool, we can’t provide users with the best guidance for fixing issues related to stack traces.

We’ve noticed that the userAgent property present in the releases object sometimes provides this information. We’ve already used this to show custom messages in the debugger modal (as shown in PR). However, the userAgent isn’t always available, especially now that we’re pushing Debug IDs more instead of releases.

Proposed Feature
We suggest adding a way in all Javascript Bundler Plugins to identify which tool was used to upload the source maps and send that information with the Sentry events. This would allow us to give users more direct guidance based on the tool they used, helping users troubleshoot issues with their stack traces more easily.

Notes

... we probably need a hybrid approach between associating stuff to a release and to an event.
So if a bundler plugin runs, we could inject global vars that the SDK reads and sends to the event via `event.sdk.something (we could add a new field to https://github.com/getsentry/relay/blob/a91f0c92860f88789ad6092ef5b1062aa3e34b80/relay-event-schema/src/protocol/clientsdk.rs#L18)
we can make this the same format as what gets attached to a release as well.

this may take some doing, we should talk with SDK folks:

scenarios:

  • projects with no source maps at all - we determine based on the event
  • projects with source maps - ideally identify the tool they use based on the latest existing source maps

STREETCH this get’s maybe too much

  • projects with source maps - but we would suggest another tool over the existing they have → example nextjs suggest plugin over GHA or sentry-cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions