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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- feat(attributes): Add sentry.normalized_db_query.hash ([#200](https://github.com/getsentry/sentry-conventions/pull/200))
- feat(attributes): Add sentry.category attribute ([#218](https://github.com/getsentry/sentry-conventions/pull/218))
- Add new Gen AI attributes ([#221](https://github.com/getsentry/sentry-conventions/pull/221))
- Add sentry.status_code attribute ([#223](https://github.com/getsentry/sentry-conventions/pull/223))
- Backfill `db.system` attribute ([#224](https://github.com/getsentry/sentry-conventions/pull/224))

## 0.3.1
Expand Down
3 changes: 2 additions & 1 deletion generated/attributes/all.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

This page lists all available attributes across all categories.

Total attributes: 421
Total attributes: 422

## Stable Attributes

Expand Down Expand Up @@ -283,6 +283,7 @@ Total attributes: 421
| [`sentry.segment.name`](./sentry.md#sentrysegmentname) | The segment name of a span |
| [`sentry.server_sample_rate`](./sentry.md#sentryserver_sample_rate) | Rate at which a span was sampled in Relay. |
| [`sentry.span.source`](./sentry.md#sentryspansource) | The source of a span, also referred to as transaction source. Known values are: `'custom'`, `'url'`, `'route'`, `'component'`, `'view'`, `'task'`. |
| [`sentry.status_code`](./sentry.md#sentrystatus_code) | The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients. |
| [`sentry.status.message`](./sentry.md#sentrystatusmessage) | The from OTLP extracted status message. |
| [`sentry.trace.parent_span_id`](./sentry.md#sentrytraceparent_span_id) | The span id of the span that was active when the log was collected. This should not be set if there was no active span. |
| [`sentry.transaction`](./sentry.md#sentrytransaction) | The sentry transaction (segment name). |
Expand Down
12 changes: 12 additions & 0 deletions generated/attributes/sentry.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- [sentry.segment.name](#sentrysegmentname)
- [sentry.server_sample_rate](#sentryserver_sample_rate)
- [sentry.span.source](#sentryspansource)
- [sentry.status_code](#sentrystatus_code)
- [sentry.status.message](#sentrystatusmessage)
- [sentry.trace.parent_span_id](#sentrytraceparent_span_id)
- [sentry.transaction](#sentrytransaction)
Expand Down Expand Up @@ -557,6 +558,17 @@ The source of a span, also referred to as transaction source. Known values are:
| Exists in OpenTelemetry | No |
| Example | `route` |

### sentry.status_code

The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.

| Property | Value |
| --- | --- |
| Type | `integer` |
| Has PII | false |
| Exists in OpenTelemetry | No |
| Example | `200` |

### sentry.status.message

The from OTLP extracted status message.
Expand Down
33 changes: 33 additions & 0 deletions javascript/sentry-conventions/src/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7274,6 +7274,26 @@ export const SENTRY_SPAN_SOURCE = 'sentry.span.source';
*/
export type SENTRY_SPAN_SOURCE_TYPE = string;

// Path: model/attributes/sentry/sentry__status_code.json

/**
* The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients. `sentry.status_code`
*
* Attribute Value Type: `number` {@link SENTRY_STATUS_CODE_TYPE}
*
* Contains PII: false
*
* Attribute defined in OTEL: No
*
* @example 200
*/
export const SENTRY_STATUS_CODE = 'sentry.status_code';

/**
* Type for {@link SENTRY_STATUS_CODE} sentry.status_code
*/
export type SENTRY_STATUS_CODE_TYPE = number;

// Path: model/attributes/sentry/sentry__status__message.json

/**
Expand Down Expand Up @@ -9137,6 +9157,7 @@ export const ATTRIBUTE_TYPE: Record<string, AttributeType> = {
[SENTRY_SEGMENT_NAME]: 'string',
[SENTRY_SERVER_SAMPLE_RATE]: 'double',
[SENTRY_SPAN_SOURCE]: 'string',
[SENTRY_STATUS_CODE]: 'integer',
[SENTRY_STATUS_MESSAGE]: 'string',
[SENTRY_TRACE_PARENT_SPAN_ID]: 'string',
[SENTRY_TRANSACTION]: 'string',
Expand Down Expand Up @@ -9561,6 +9582,7 @@ export type AttributeName =
| typeof SENTRY_SEGMENT_NAME
| typeof SENTRY_SERVER_SAMPLE_RATE
| typeof SENTRY_SPAN_SOURCE
| typeof SENTRY_STATUS_CODE
| typeof SENTRY_STATUS_MESSAGE
| typeof SENTRY_TRACE_PARENT_SPAN_ID
| typeof SENTRY_TRANSACTION
Expand Down Expand Up @@ -13269,6 +13291,16 @@ export const ATTRIBUTE_METADATA: Record<AttributeName, AttributeMetadata> = {
isInOtel: false,
example: 'route',
},
[SENTRY_STATUS_CODE]: {
brief:
'The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.',
type: 'integer',
pii: {
isPii: 'false',
},
isInOtel: false,
example: 200,
},
[SENTRY_STATUS_MESSAGE]: {
brief: 'The from OTLP extracted status message.',
type: 'string',
Expand Down Expand Up @@ -14301,6 +14333,7 @@ export type Attributes = {
[SENTRY_SEGMENT_NAME]?: SENTRY_SEGMENT_NAME_TYPE;
[SENTRY_SERVER_SAMPLE_RATE]?: SENTRY_SERVER_SAMPLE_RATE_TYPE;
[SENTRY_SPAN_SOURCE]?: SENTRY_SPAN_SOURCE_TYPE;
[SENTRY_STATUS_CODE]?: SENTRY_STATUS_CODE_TYPE;
[SENTRY_STATUS_MESSAGE]?: SENTRY_STATUS_MESSAGE_TYPE;
[SENTRY_TRACE_PARENT_SPAN_ID]?: SENTRY_TRACE_PARENT_SPAN_ID_TYPE;
[SENTRY_TRANSACTION]?: SENTRY_TRANSACTION_TYPE;
Expand Down
10 changes: 10 additions & 0 deletions model/attributes/sentry/sentry__status_code.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"key": "sentry.status_code",
"brief": "The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.",
"type": "integer",
"pii": {
"key": "false"
},
"is_in_otel": false,
"example": 200
}
18 changes: 18 additions & 0 deletions python/src/sentry_conventions/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4061,6 +4061,16 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
Example: "foobar"
"""

# Path: model/attributes/sentry/sentry__status_code.json
SENTRY_STATUS_CODE: Literal["sentry.status_code"] = "sentry.status_code"
"""The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.

Type: int
Contains PII: false
Defined in OTEL: No
Example: 200
"""

# Path: model/attributes/sentry/sentry__trace__parent_span_id.json
SENTRY_TRACE_PARENT_SPAN_ID: Literal["sentry.trace.parent_span_id"] = (
"sentry.trace.parent_span_id"
Expand Down Expand Up @@ -7571,6 +7581,13 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
is_in_otel=False,
example="foobar",
),
"sentry.status_code": AttributeMetadata(
brief="The HTTP status code used in Sentry Insights. Typically set by Sentry during ingestion, rather than by clients.",
type=AttributeType.INTEGER,
pii=PiiInfo(isPii=IsPii.FALSE),
is_in_otel=False,
example=200,
),
"sentry.trace.parent_span_id": AttributeMetadata(
brief="The span id of the span that was active when the log was collected. This should not be set if there was no active span.",
type=AttributeType.STRING,
Expand Down Expand Up @@ -8448,6 +8465,7 @@ class ATTRIBUTE_NAMES(metaclass=_AttributeNamesMeta):
"sentry.server_sample_rate": float,
"sentry.span.source": str,
"sentry.status.message": str,
"sentry.status_code": int,
"sentry.trace.parent_span_id": str,
"sentry.transaction": str,
"server.address": str,
Expand Down
Loading