From 209a8eae57423b66b31e90657be2ea0c19542ca9 Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 1 Apr 2025 12:43:51 +0200 Subject: [PATCH 1/2] docs(sdk): Add runtime to SDK interface --- .../sdk/data-model/event-payloads/sdk.mdx | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/develop-docs/sdk/data-model/event-payloads/sdk.mdx b/develop-docs/sdk/data-model/event-payloads/sdk.mdx index b27c4fb1f91bf..c530cba1d8d79 100644 --- a/develop-docs/sdk/data-model/event-payloads/sdk.mdx +++ b/develop-docs/sdk/data-model/event-payloads/sdk.mdx @@ -69,6 +69,18 @@ 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 where the code executes 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. +Showing the value of this field in the issue details helps developers quickly identify where +an issue occurred without needing to analyze the full error context. + + - `"Frontend"` - For code running in the browser + - `"Backend"` - For server-side code, web workers or edge runtimes + ## Example The following example illustrates the SDK part of the event payload and omits other @@ -94,3 +106,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" + } + ] + }, +} +``` + From 8356a046f3a62faa27e54dacfef147e9b2665d3d Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Tue, 1 Apr 2025 15:23:02 +0200 Subject: [PATCH 2/2] improve text --- .../sdk/data-model/event-payloads/sdk.mdx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/develop-docs/sdk/data-model/event-payloads/sdk.mdx b/develop-docs/sdk/data-model/event-payloads/sdk.mdx index c530cba1d8d79..98ee968a9e074 100644 --- a/develop-docs/sdk/data-model/event-payloads/sdk.mdx +++ b/develop-docs/sdk/data-model/event-payloads/sdk.mdx @@ -71,15 +71,13 @@ reference (branch, tag or SHA). `runtime` -: _Optional_. A string to identify the runtime environment where the code executes 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. -Showing the value of this field in the issue details helps developers quickly identify where -an issue occurred without needing to analyze the full error context. - - - `"Frontend"` - For code running in the browser - - `"Backend"` - For server-side code, web workers or edge runtimes +: _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