Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(sdk): Add runtime to SDK interface #13190

Closed
wants to merge 2 commits into from
Closed

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

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant