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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions develop-docs/sdk/data-model/event-payloads/sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ activated integrations. Each package consists of a `name` in the format
`identifier` should be a checkout link and the `version` should be a Git
reference (branch, tag or SHA).

`runtime`

: _Optional_. A string to identify the runtime environment when it's not obvious from
the SDK name alone. This field is particularly valuable in Meta-Frameworks (like Next.js,
Nuxt or React Router) to distinguish between frontend and backend parts.
Displaying this field in issue details allows developers to quickly determine where an error
occurred without examining the full error context. The following strings are available:
- `"Frontend"` - Code running in the browser
- `"Backend"` - Code running on servers, web workers, or edge runtimes

## Example

The following example illustrates the SDK part of the <Link to="/sdk/data-model/event-payloads/">event payload</Link> and omits other
Expand All @@ -94,3 +104,27 @@ attributes for simplicity.
}
}
```

The following example shows the usage of the `runtime` label for Meta-Frameworks:

```json
{
"sdk": {
"name": "sentry.javascript.nuxt",
"version": "9.10.0",
"integrations": ["BrowserTracing", "Vue"],
"runtime": "Frontend",
"packages": [
{
"name": "npm:@sentry/nuxt",
"version": "9.10.0"
},
{
"name": "npm:@sentry/vue",
"version": "9.10.0"
}
]
},
}
```