Skip to content

Conversation

@s1gr1d
Copy link
Member

@s1gr1d s1gr1d commented Apr 1, 2025

Problem

Meta-Frameworks include a frontend as well as backend environment. They have the problem that the execution environment (frontend/backend) of their errors in Sentry are hard to distinguish.

As all of their issues come into the same projects you don't know if this is a frontend or backend problem.

An issue for this was created here: Discern Client vs Server Errors

Solution

The idea is to include the platform to the SDK payload. The platform is a pre-defined set of allowed strings:

  • Frontend: for anything that is happening in the browser
  • Backend: for anything happening on the server, a worker or on edge.

The SDK payload currently includes things like name, version, integrations etc (docs here).

Why is this information not added to the event context?

It can be added to the event context and in most cases, there is something added already (e.g. event.context.runtime.name). However, this runtime is added to all SDKs, not only the Meta-Frameworks.

Other naming suggestions

environment

  • Could be confused with deployment environments (dev/prod/staging)
  • Some might expect environment variables rather than runtime type

platform

  • Could be confused with OS platforms (iOS, Android, Windows)
  • "Frontend" and "backend" aren't typically described as platforms

Further Reading

Develop Docs: SDK Interface

Related PR: getsentry/sentry#88312

@vercel
Copy link

vercel bot commented Apr 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
develop-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2025 1:30pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2025 1:30pm
sentry-docs ⬜️ Ignored (Inspect) Visit Preview Apr 1, 2025 1:30pm

@s1gr1d
Copy link
Member Author

s1gr1d commented Apr 4, 2025

Closing as this does not seem to be relevant now. We can derive the information from other data points.

@s1gr1d s1gr1d closed this Apr 4, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants