Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion develop-docs/sdk/telemetry/logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
title: Logs
description: Structured logging protocol with severity levels, trace context, and batched envelope delivery.
spec_id: sdk/telemetry/logs
spec_version: 2.2.0
spec_version: 2.3.0
spec_status: stable
spec_depends_on:
- id: sdk/foundations/transport/envelopes
version: ">=1.0.0"
- id: sdk/foundations/state-management/scopes/attributes
version: ">=1.0.0"
spec_changelog:
- version: 2.3.0
date: 2026-09-22
summary: Added sentry.is_localhost default attribute for localhost inbound filtering
- version: 2.2.0
date: 2026-06-22
summary: Promoted most spec sections from candidate to stable
Expand Down Expand Up @@ -168,6 +171,7 @@ SDKs **MUST** attach the following attributes to every log:
| `sentry.sdk.name` | 1.0.0 | The name of the SDK that sent the log. |
| `sentry.sdk.version` | 1.0.0 | The version of the SDK that sent the log. |
| `sentry.replay_id` | 1.8.0 | The replay ID of the active replay when the log was collected. **MUST NOT** be set if no replay is active. |
| `sentry.is_localhost` | 2.3.0 | Whether the SDK determined the application is running on localhost. Used to enable the localhost inbound filter. The definition of "localhost" is platform-specific. Follow [Relay's detection heuristics](https://github.com/getsentry/relay/blob/master/relay-filter/src/localhost.rs) if applicable |
Comment thread
cleptric marked this conversation as resolved.
Resolved

For parameterized logs, SDKs **MUST** also attach:

Expand Down
6 changes: 5 additions & 1 deletion develop-docs/sdk/telemetry/metrics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@
title: Metrics
description: Counter, gauge, and distribution metrics sent as batched trace_metric envelope items.
spec_id: sdk/telemetry/metrics
spec_version: 2.10.0
spec_version: 2.11.0
spec_status: stable
spec_depends_on:
- id: sdk/foundations/transport/envelopes
version: ">=1.0.0"
- id: sdk/foundations/state-management/scopes/attributes
version: ">=1.0.0"
spec_changelog:
- version: 2.11.0
date: 2026-09-22
summary: Added sentry.is_localhost default attribute for localhost inbound filtering
- version: 2.10.0
date: 2026-06-22
summary: Added client reports requirement (trace_metric count, trace_metric_byte size)
Expand Down Expand Up @@ -131,6 +134,7 @@ SDKs **MUST** attach the following attributes to every metric by default:
2. `sentry.release` — the release set in the SDK, if defined.
3. `sentry.sdk.name` — the name of the SDK that sent the metric.
4. `sentry.sdk.version` — the version of the SDK that sent the metric.
5. `sentry.is_localhost` — whether the SDK determined the application is running on localhost (since 2.11.0). Used to enable the localhost inbound filter. The definition of "localhost" is platform-specific.
Comment thread
cleptric marked this conversation as resolved.
Resolved

SDKs **SHOULD** minimize the number of default attributes. Metrics cardinality can explode quickly with too many attributes. New default attributes **SHOULD** only be added after significant feedback from users and discussion internally with the SDK and ingest teams.

Expand Down
9 changes: 9 additions & 0 deletions develop-docs/sdk/telemetry/spans/span-protocol.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ The `items` array **MUST** contain at least one and at most 1000 span objects:
"type": "string",
"value": "auto"
},
"sentry.is_localhost": {
"type": "boolean",
"value": true
},
Comment thread
cleptric marked this conversation as resolved.
Resolved
Comment thread
cleptric marked this conversation as resolved.
Resolved
"server.address": {
"type": "string",
"value": "127.0.0.1"
Expand Down Expand Up @@ -190,6 +194,10 @@ The `items` array **MUST** contain at least one and at most 1000 span objects:
"sentry.origin": {
"type": "string",
"value": "auto"
},
"sentry.is_localhost": {
"type": "boolean",
"value": true
}
}
}
Expand Down Expand Up @@ -247,6 +255,7 @@ All attributes mentioned below MUST be attached to every span being emitted from
| `thread.name` | string | Required | The thread name |
| `sentry.sdk.name` | string | Required | Name of the Sentry SDK (e.g., "sentry.php", "sentry.javascript") |
| `sentry.sdk.version` | string | Required | Version of the Sentry SDK |
| `sentry.is_localhost` | boolean | Required | Whether the SDK determined the application is running on localhost. Used to enable the localhost inbound filter. The definition of "localhost" is platform-specific. |
Comment thread
cleptric marked this conversation as resolved.
Resolved

Spans missing **Strictly Required** attributes MAY be rejected by Relay.
All other attributes in the table are required _if_ they are available to the SDK.
Expand Down
Loading