From 476b41baf2b4257d530e21ce1dac6cf986666f44 Mon Sep 17 00:00:00 2001 From: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com> Date: Mon, 20 Apr 2026 11:28:57 +0200 Subject: [PATCH 1/2] docs(develop): Loosen metrics SDK spec --- develop-docs/sdk/telemetry/metrics.mdx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/develop-docs/sdk/telemetry/metrics.mdx b/develop-docs/sdk/telemetry/metrics.mdx index bc828208cdbc8..858ef51527dd0 100644 --- a/develop-docs/sdk/telemetry/metrics.mdx +++ b/develop-docs/sdk/telemetry/metrics.mdx @@ -370,9 +370,13 @@ Sentry.init({ -### Metrics Module +### Metrics Capturing Functionality -SDKs **MUST** expose metrics methods in a `metrics` module or namespace. At minimum, the SDK **MUST** implement the following methods: +SDKs **MUST** expose functionality for capturing `count`, `gauge`, and `distribution` metrics. + +Metrics-capturing functionality **SHOULD** be exposed as functions (or another suitable language construct) in a `metrics` module or namespace. If exposing the functionality in a module or namespace is infeasible in a particular SDK's language, the functions/macros/etc. **SHOULD** be prefixed with `metrics`. + +The **RECOMMENDED** API is as follows: - `Sentry.metrics.count(name, value, options)` — increment a counter - `Sentry.metrics.gauge(name, value, options)` — set a gauge value From 92d3323773386c433e99e0888c45ade280d99e0d Mon Sep 17 00:00:00 2001 From: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com> Date: Mon, 20 Apr 2026 11:35:37 +0200 Subject: [PATCH 2/2] Change prefix for metrics functions to 'metric' Updated the terminology for function naming conventions in the metrics documentation. --- develop-docs/sdk/telemetry/metrics.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/sdk/telemetry/metrics.mdx b/develop-docs/sdk/telemetry/metrics.mdx index 858ef51527dd0..beb1c1f2e8a11 100644 --- a/develop-docs/sdk/telemetry/metrics.mdx +++ b/develop-docs/sdk/telemetry/metrics.mdx @@ -374,7 +374,7 @@ Sentry.init({ SDKs **MUST** expose functionality for capturing `count`, `gauge`, and `distribution` metrics. -Metrics-capturing functionality **SHOULD** be exposed as functions (or another suitable language construct) in a `metrics` module or namespace. If exposing the functionality in a module or namespace is infeasible in a particular SDK's language, the functions/macros/etc. **SHOULD** be prefixed with `metrics`. +Metrics-capturing functionality **SHOULD** be exposed as functions (or another suitable language construct) in a `metrics` module or namespace. If exposing the functionality in a module or namespace is infeasible in a particular SDK's language, the function names **SHOULD** be prefixed with the word `metric`. The **RECOMMENDED** API is as follows: