From 6c2d1a6071b1b99ce4e84bce6b7e5d102e6e515d Mon Sep 17 00:00:00 2001 From: abdellah hariti Date: Mon, 29 Jul 2024 17:44:29 +0100 Subject: [PATCH] replace mdx imports with their actual content on dev docs (#10740) * replace mdx imports with their actual content on dev docs * remove definition list syntax --- develop-docs/sdk/event-payloads/index.mdx | 24 ++- .../properties/contexts_trace.mdx | 18 -- .../event-payloads/properties/description.mdx | 9 - .../event-payloads/properties/event_id.mdx | 10 - .../properties/measurements.mdx | 45 ----- .../sdk/event-payloads/properties/op.mdx | 11 - .../properties/parent_span_id.mdx | 9 - .../sdk/event-payloads/properties/span_id.mdx | 9 - .../properties/span_start_timestamp.mdx | 22 -- .../properties/span_timestamp.mdx | 21 -- .../sdk/event-payloads/properties/spans.mdx | 37 ---- .../sdk/event-payloads/properties/status.mdx | 29 --- .../sdk/event-payloads/properties/tags.mdx | 12 -- .../event-payloads/properties/trace_id.mdx | 9 - .../properties/transaction_info.mdx | 29 --- .../sdk/event-payloads/properties/type.mdx | 9 - develop-docs/sdk/event-payloads/span.mdx | 140 ++++++++++++- .../sdk/event-payloads/transaction.mdx | 188 +++++++++++++++++- 18 files changed, 334 insertions(+), 297 deletions(-) delete mode 100644 develop-docs/sdk/event-payloads/properties/contexts_trace.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/description.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/event_id.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/measurements.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/op.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/parent_span_id.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/span_id.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/span_start_timestamp.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/span_timestamp.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/spans.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/status.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/tags.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/trace_id.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/transaction_info.mdx delete mode 100644 develop-docs/sdk/event-payloads/properties/type.mdx diff --git a/develop-docs/sdk/event-payloads/index.mdx b/develop-docs/sdk/event-payloads/index.mdx index 515cb14782cc6..8dba0c5343c56 100644 --- a/develop-docs/sdk/event-payloads/index.mdx +++ b/develop-docs/sdk/event-payloads/index.mdx @@ -37,7 +37,16 @@ time when it occurred. The following attributes are required for all events. -import "./properties/event_id.mdx" +`event_id` + +_Required_. Hexadecimal string representing a uuid4 value. The length is exactly 32 + characters. Dashes are not allowed. Has to be lowercase. + + ```json + { + "event_id": "fc6d8c0c43fc4630ad850ee518f1b9d0" + } + ``` `timestamp` @@ -187,7 +196,18 @@ of an Xcode build or the version code of an Android build. } ``` -import "./properties/tags.mdx" +`tags` + +_Optional_. A map or list of tags for this event. Each tag must be less than 200 characters. + + ```json + { + "tags": { + "ios_version": "4.0", + "context": "production" + } + } + ``` `environment` diff --git a/develop-docs/sdk/event-payloads/properties/contexts_trace.mdx b/develop-docs/sdk/event-payloads/properties/contexts_trace.mdx deleted file mode 100644 index f07531b218d8c..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/contexts_trace.mdx +++ /dev/null @@ -1,18 +0,0 @@ -`contexts.trace` - -_Recommended_. A Transaction has to have a specific `contexts.trace` entry that contains tracing information. See the [Trace Context documentation](/sdk/event-payloads/contexts/#trace-context). - -```json -{ - "contexts": { - "trace": { - "op": "navigation", - "description": "User clicked on ", - "trace_id": "743ad8bbfdd84e99bc38b4729e2864de", - "span_id": "a0cfbde2bdff3adc", - "status": "ok", - "parent_span_id": "99659d76b7cdae94" - } - } -} -``` diff --git a/develop-docs/sdk/event-payloads/properties/description.mdx b/develop-docs/sdk/event-payloads/properties/description.mdx deleted file mode 100644 index d743a45cf7413..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/description.mdx +++ /dev/null @@ -1,9 +0,0 @@ -`description` - -_Optional_. Longer description of the span's operation, which uniquely identifies the span but is consistent across instances of the span. - - ```json - { - "description": "SELECT * FROM users WHERE last_active < DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR)`" - } - ``` diff --git a/develop-docs/sdk/event-payloads/properties/event_id.mdx b/develop-docs/sdk/event-payloads/properties/event_id.mdx deleted file mode 100644 index b0ebcf63b755b..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/event_id.mdx +++ /dev/null @@ -1,10 +0,0 @@ -`event_id` - -_Required_. Hexadecimal string representing a uuid4 value. The length is exactly 32 - characters. Dashes are not allowed. Has to be lowercase. - - ```json - { - "event_id": "fc6d8c0c43fc4630ad850ee518f1b9d0" - } - ``` \ No newline at end of file diff --git a/develop-docs/sdk/event-payloads/properties/measurements.mdx b/develop-docs/sdk/event-payloads/properties/measurements.mdx deleted file mode 100644 index b690a482499b8..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/measurements.mdx +++ /dev/null @@ -1,45 +0,0 @@ -`measurements` - -_Optional_. An object containing standard/custom measurements with keys signifying the name of the measurement. - -- Standard measurement keys currently supported are from the following list taken from [here](https://github.com/getsentry/sentry/blob/a8c960a933d2ded5225841573d8fc426a482ca9c/static/app/utils/discover/fields.tsx#L654-L676). - -```json -[ - // Web - "fp", - "fcp", - "lcp", - "fid", - "cls", - "ttfb", - "ttfb.requesttime", - - // Mobile - "app_start_cold", - "app_start_warm", - "frames_total", - "frames_slow", - "frames_frozen", - - // React native - "frames_slow_rate", - "frames_frozen_rate", - "stall_count", - "stall_total_time", - "stall_longest_time", - "stall_percentage" -] -``` - -- For the well-known measurements listed above, Sentry automatically infers units. Custom measurements need units to be specified; if the units are missing, Relay will set them to `"none"` as a default. The full list of supported units is specified on [Relay's `MetricUnit`](https://getsentry.github.io/relay/relay_metrics/enum.MetricUnit.html). Sentry's event ingestion supports arbitrary custom units, but many SDKs will not expose a generic user-defined unit interface. - -```json -{ - "measurements": { - "lcp": { "value": 100 }, - "fp": { "value": 123 }, - "my.custom.metric": { "value": 456, "unit": "millisecond" } - } -} -``` diff --git a/develop-docs/sdk/event-payloads/properties/op.mdx b/develop-docs/sdk/event-payloads/properties/op.mdx deleted file mode 100644 index 77ae8662100ac..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/op.mdx +++ /dev/null @@ -1,11 +0,0 @@ -`op` - -_Recommended_. Short code identifying the type of operation the span is measuring. - -For more details, see Sentry's conventions around span operations. - - ```json - { - "op": "db.query" - } - ``` \ No newline at end of file diff --git a/develop-docs/sdk/event-payloads/properties/parent_span_id.mdx b/develop-docs/sdk/event-payloads/properties/parent_span_id.mdx deleted file mode 100644 index e231470222ad0..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/parent_span_id.mdx +++ /dev/null @@ -1,9 +0,0 @@ -`parent_span_id`: - -_Optional_. If this Span should be rendered as a child of another Span, set this property to the id of the parent. - - ```json - { - "parent_span_id": "b0e6f15b45c36b12" - } - ``` \ No newline at end of file diff --git a/develop-docs/sdk/event-payloads/properties/span_id.mdx b/develop-docs/sdk/event-payloads/properties/span_id.mdx deleted file mode 100644 index 1232e72c4831f..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/span_id.mdx +++ /dev/null @@ -1,9 +0,0 @@ -`span_id`: - -_Required_. A random hex string with a length of 16 characters. - - ```json - { - "span_id": "99659d76b7cdae94" - } - ``` \ No newline at end of file diff --git a/develop-docs/sdk/event-payloads/properties/span_start_timestamp.mdx b/develop-docs/sdk/event-payloads/properties/span_start_timestamp.mdx deleted file mode 100644 index 549a73eed98cb..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/span_start_timestamp.mdx +++ /dev/null @@ -1,22 +0,0 @@ -`start_timestamp` - -_Required_. A timestamp representing when the measuring started. The - format is either a string as defined in [RFC - 3339](https://tools.ietf.org/html/rfc3339) or a numeric (integer or float) - value representing the number of seconds that have elapsed since the [Unix - epoch](https://en.wikipedia.org/wiki/Unix_time). The `start_timestamp` value must be less than or - equal to the `timestamp` value, otherwise the Span is discarded as invalid. - - ```json - { - "start_timestamp": "2011-05-02T17:41:36.242Z" - } - ``` - -or: - - ```json - { - "start_timestamp": 1304358096.242 - } - ``` diff --git a/develop-docs/sdk/event-payloads/properties/span_timestamp.mdx b/develop-docs/sdk/event-payloads/properties/span_timestamp.mdx deleted file mode 100644 index 736bdd9c69ef2..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/span_timestamp.mdx +++ /dev/null @@ -1,21 +0,0 @@ -`timestamp` - -_Required_. A timestamp representing when the measuring finished. The - format is either a string as defined in [RFC - 3339](https://tools.ietf.org/html/rfc3339) or a numeric (integer or float) - value representing the number of seconds that have elapsed since the [Unix - epoch](https://en.wikipedia.org/wiki/Unix_time). - - ```json - { - "timestamp": "2011-05-02T17:41:36.955Z" - } - ``` - -or: - - ```json - { - "timestamp": 1304358096.955 - } - ``` diff --git a/develop-docs/sdk/event-payloads/properties/spans.mdx b/develop-docs/sdk/event-payloads/properties/spans.mdx deleted file mode 100644 index 94c2824966263..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/spans.mdx +++ /dev/null @@ -1,37 +0,0 @@ -`spans` - -_Recommended_. A list of [Spans](/sdk/event-payloads/span/). - -```json -{ - "spans": [ - { - "start_timestamp": 1588601261.481961, - "description": "GET /sockjs-node/info", - "tags": { - "http.status_code": "200" - }, - "timestamp": 1588601261.488901, - "parent_span_id": "b0e6f15b45c36b12", - "trace_id": "1e57b752bc6e4544bbaa246cd1d05dee", - "op": "http", - "data": { - "url": "http://localhost:8080/sockjs-node/info?t=1588601703755", - "status_code": 200, - "type": "xhr", - "method": "GET" - }, - "span_id": "b01b9f6349558cd1" - }, - { - "start_timestamp": 1588601261.535386, - "description": "Vue ", - "timestamp": 1588601261.544196, - "parent_span_id": "9312d0d18bf51736", - "trace_id": "1e57b752bc6e4544bbaa246cd1d05dee", - "op": "update", - "span_id": "b980d4dec78d7344" - } - ] -} -``` diff --git a/develop-docs/sdk/event-payloads/properties/status.mdx b/develop-docs/sdk/event-payloads/properties/status.mdx deleted file mode 100644 index 04eec70771661..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/status.mdx +++ /dev/null @@ -1,29 +0,0 @@ -`status` - -_Optional_. Describes the `status` of the Span/Transaction. - -| State | Description | HTTP status code equivalent | -| ---------------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------- | -| `ok` | Not an error, returned on success | 200 and 2XX HTTP statuses | -| `cancelled` | The operation was cancelled, typically by the caller | 499 | -| `unknown` or `unknown_error` | An unknown error raised by APIs that don't return enough error information | 500 | -| `invalid_argument` | The client specified an invalid argument | 400 | -| `deadline_exceeded` | The deadline expired before the operation could succeed | 504 | -| `not_found` | Content was not found or request was denied for an entire class of users | 404 | -| `already_exists` | The entity attempted to be created already exists | 409 | -| `permission_denied` | The caller doesn't have permission to execute the specified operation | 403 | -| `resource_exhausted` | The resource has been exhausted e.g. per-user quota exhausted, file system out of space | 429 | -| `failed_precondition` | The client shouldn't retry until the system state has been explicitly handled | 400 | -| `aborted` | The operation was aborted | 409 | -| `out_of_range` | The operation was attempted past the valid range e.g. seeking past the end of a file | 400 | -| `unimplemented` | The operation is not implemented or is not supported/enabled for this operation | 501 | -| `internal_error` | Some invariants expected by the underlying system have been broken. This code is reserved for serious errors | 500 | -| `unavailable` | The service is currently available e.g. as a transient condition | 503 | -| `data_loss` | Unrecoverable data loss or corruption | 500 | -| `unauthenticated` | The requester doesn't have valid authentication credentials for the operation | 401 | - -```json -{ - "status": "ok" -} -``` diff --git a/develop-docs/sdk/event-payloads/properties/tags.mdx b/develop-docs/sdk/event-payloads/properties/tags.mdx deleted file mode 100644 index fad614063b029..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/tags.mdx +++ /dev/null @@ -1,12 +0,0 @@ -`tags` - -_Optional_. A map or list of tags for this event. Each tag must be less than 200 characters. - - ```json - { - "tags": { - "ios_version": "4.0", - "context": "production" - } - } - ``` \ No newline at end of file diff --git a/develop-docs/sdk/event-payloads/properties/trace_id.mdx b/develop-docs/sdk/event-payloads/properties/trace_id.mdx deleted file mode 100644 index a9c1f2ec0eddf..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/trace_id.mdx +++ /dev/null @@ -1,9 +0,0 @@ -`trace_id`: - -_Required_. Determines which `trace` the Span belongs to. The value should be 16 random bytes encoded as a hex string (32 characters long). - - ```json - { - "trace_id": "1e57b752bc6e4544bbaa246cd1d05dee" - } - ``` diff --git a/develop-docs/sdk/event-payloads/properties/transaction_info.mdx b/develop-docs/sdk/event-payloads/properties/transaction_info.mdx deleted file mode 100644 index 57de6655116db..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/transaction_info.mdx +++ /dev/null @@ -1,29 +0,0 @@ -`transaction_info` - -_Recommended_. Additional information about the name of the transaction. - -```json -{ - "transaction_info": { - "source": "route" - } -} -``` - -`transaction_info.source` - -_Required_. This information is required by dynamic sampling. -Contains information about how the name of the transaction was determined. -This will be used by the server to decide whether or not to scrub identifiers -from the transaction name, or replace the entire name with a placeholder. The `source` should -only be set by integrations and not by developers directly. - -| Source | Description |
Examples
| -| ----------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -| `custom` | User-defined name, see [`setTransactionName()`](https://docs.sentry.io/platforms/javascript/enriching-events/transaction-name/) | `my_transaction` | -| `url` | Raw URL, potentially containing identifiers. | `/auth/login/john123/`
`GET /auth/login/john123/` | -| `route` | Parametrized URL / route | `/auth/login/:userId/`
`GET /auth/login/{user}/` | -| `view` | Name of the view handling the request. | `UserListView` | -| `component` | Named after a software component, such as a function or class name. | `AuthLogin.login`
`LoginActivity.login_button` | -| `task` | Name of a background task (e.g. a Celery task) | `sentry.tasks.do_something` | -| `unknown` | _Value set by Relay for legacy SDKs. SDKs must not set this value explicitly._ | | diff --git a/develop-docs/sdk/event-payloads/properties/type.mdx b/develop-docs/sdk/event-payloads/properties/type.mdx deleted file mode 100644 index 7f8812a6b9b3d..0000000000000 --- a/develop-docs/sdk/event-payloads/properties/type.mdx +++ /dev/null @@ -1,9 +0,0 @@ -`type` - -_Required_. A Transaction has to have this value set to `transaction`. - - ```json - { - "type": "transaction" - } - ``` \ No newline at end of file diff --git a/develop-docs/sdk/event-payloads/span.mdx b/develop-docs/sdk/event-payloads/span.mdx index 186625abbf1c2..bccdee8753bdd 100644 --- a/develop-docs/sdk/event-payloads/span.mdx +++ b/develop-docs/sdk/event-payloads/span.mdx @@ -10,23 +10,145 @@ While Span attributes will be normalized on the server, a Span is most useful wh ## Attributes -import "./properties/span_id.mdx"; +`span_id`: -import "./properties/parent_span_id.mdx"; +_Required_. A random hex string with a length of 16 characters. -import "./properties/trace_id.mdx"; + ```json + { + "span_id": "99659d76b7cdae94" + } + ``` + +`parent_span_id`: + +_Optional_. If this Span should be rendered as a child of another Span, set this property to the id of the parent. + + ```json + { + "parent_span_id": "b0e6f15b45c36b12" + } + ``` + +`trace_id`: + +_Required_. Determines which `trace` the Span belongs to. The value should be 16 random bytes encoded as a hex string (32 characters long). + + ```json + { + "trace_id": "1e57b752bc6e4544bbaa246cd1d05dee" + } + ``` + +`op` + +_Recommended_. Short code identifying the type of operation the span is measuring. + +For more details, see Sentry's conventions around span operations. + + ```json + { + "op": "db.query" + } + ``` + +`description` + +_Optional_. Longer description of the span's operation, which uniquely identifies the span but is consistent across instances of the span. + + ```json + { + "description": "SELECT * FROM users WHERE last_active < DATE_SUB(CURRENT_DATE, INTERVAL 1 YEAR)`" + } + ``` -import "./properties/op.mdx"; +`start_timestamp` -import "./properties/description.mdx"; +_Required_. A timestamp representing when the measuring started. The + format is either a string as defined in [RFC + 3339](https://tools.ietf.org/html/rfc3339) or a numeric (integer or float) + value representing the number of seconds that have elapsed since the [Unix + epoch](https://en.wikipedia.org/wiki/Unix_time). The `start_timestamp` value must be less than or + equal to the `timestamp` value, otherwise the Span is discarded as invalid. -import "./properties/span_start_timestamp.mdx"; + ```json + { + "start_timestamp": "2011-05-02T17:41:36.242Z" + } + ``` + +or: + + ```json + { + "start_timestamp": 1304358096.242 + } + ``` + +`timestamp` + +_Required_. A timestamp representing when the measuring finished. The + format is either a string as defined in [RFC + 3339](https://tools.ietf.org/html/rfc3339) or a numeric (integer or float) + value representing the number of seconds that have elapsed since the [Unix + epoch](https://en.wikipedia.org/wiki/Unix_time). + + ```json + { + "timestamp": "2011-05-02T17:41:36.955Z" + } + ``` + +or: -import "./properties/span_timestamp.mdx"; + ```json + { + "timestamp": 1304358096.955 + } + ``` + +`status` + +_Optional_. Describes the `status` of the Span/Transaction. + +| State | Description | HTTP status code equivalent | +| ---------------------------- | ------------------------------------------------------------------------------------------------------------ | --------------------------- | +| `ok` | Not an error, returned on success | 200 and 2XX HTTP statuses | +| `cancelled` | The operation was cancelled, typically by the caller | 499 | +| `unknown` or `unknown_error` | An unknown error raised by APIs that don't return enough error information | 500 | +| `invalid_argument` | The client specified an invalid argument | 400 | +| `deadline_exceeded` | The deadline expired before the operation could succeed | 504 | +| `not_found` | Content was not found or request was denied for an entire class of users | 404 | +| `already_exists` | The entity attempted to be created already exists | 409 | +| `permission_denied` | The caller doesn't have permission to execute the specified operation | 403 | +| `resource_exhausted` | The resource has been exhausted e.g. per-user quota exhausted, file system out of space | 429 | +| `failed_precondition` | The client shouldn't retry until the system state has been explicitly handled | 400 | +| `aborted` | The operation was aborted | 409 | +| `out_of_range` | The operation was attempted past the valid range e.g. seeking past the end of a file | 400 | +| `unimplemented` | The operation is not implemented or is not supported/enabled for this operation | 501 | +| `internal_error` | Some invariants expected by the underlying system have been broken. This code is reserved for serious errors | 500 | +| `unavailable` | The service is currently available e.g. as a transient condition | 503 | +| `data_loss` | Unrecoverable data loss or corruption | 500 | +| `unauthenticated` | The requester doesn't have valid authentication credentials for the operation | 401 | -import "./properties/status.mdx"; +```json +{ + "status": "ok" +} +``` -import "./properties/tags.mdx"; +`tags` + +_Optional_. A map or list of tags for this event. Each tag must be less than 200 characters. + + ```json + { + "tags": { + "ios_version": "4.0", + "context": "production" + } + } + ``` `data` diff --git a/develop-docs/sdk/event-payloads/transaction.mdx b/develop-docs/sdk/event-payloads/transaction.mdx index db3d1a8d8c18e..b72a9db7cfd1e 100644 --- a/develop-docs/sdk/event-payloads/transaction.mdx +++ b/develop-docs/sdk/event-payloads/transaction.mdx @@ -21,18 +21,192 @@ properties that will be covered in the next section. Transactions are [Events](/sdk/event-payloads/) enriched with [Span](/sdk/event-payloads/span/) data. We are only going to list here what is important for a Transaction. -import "./properties/type.mdx"; +`type` -import "./properties/span_start_timestamp.mdx"; +_Required_. A Transaction has to have this value set to `transaction`. -import "./properties/span_timestamp.mdx"; + ```json + { + "type": "transaction" + } + ``` -import "./properties/contexts_trace.mdx"; +`start_timestamp` -import "./properties/spans.mdx"; +_Required_. A timestamp representing when the measuring started. The + format is either a string as defined in [RFC + 3339](https://tools.ietf.org/html/rfc3339) or a numeric (integer or float) + value representing the number of seconds that have elapsed since the [Unix + epoch](https://en.wikipedia.org/wiki/Unix_time). The `start_timestamp` value must be less than or + equal to the `timestamp` value, otherwise the Span is discarded as invalid. -import "./properties/measurements.mdx"; + ```json + { + "start_timestamp": "2011-05-02T17:41:36.242Z" + } + ``` + +or: + + ```json + { + "start_timestamp": 1304358096.242 + } + ``` + +`timestamp` + +_Required_. A timestamp representing when the measuring finished. The + format is either a string as defined in [RFC + 3339](https://tools.ietf.org/html/rfc3339) or a numeric (integer or float) + value representing the number of seconds that have elapsed since the [Unix + epoch](https://en.wikipedia.org/wiki/Unix_time). + + ```json + { + "timestamp": "2011-05-02T17:41:36.955Z" + } + ``` + +or: + + ```json + { + "timestamp": 1304358096.955 + } + ``` + +`contexts.trace` + +_Recommended_. A Transaction has to have a specific `contexts.trace` entry that contains tracing information. See the [Trace Context documentation](/sdk/event-payloads/contexts/#trace-context). + +```json +{ + "contexts": { + "trace": { + "op": "navigation", + "description": "User clicked on ", + "trace_id": "743ad8bbfdd84e99bc38b4729e2864de", + "span_id": "a0cfbde2bdff3adc", + "status": "ok", + "parent_span_id": "99659d76b7cdae94" + } + } +} +``` + +`spans` + +_Recommended_. A list of [Spans](/sdk/event-payloads/span/). + +```json +{ + "spans": [ + { + "start_timestamp": 1588601261.481961, + "description": "GET /sockjs-node/info", + "tags": { + "http.status_code": "200" + }, + "timestamp": 1588601261.488901, + "parent_span_id": "b0e6f15b45c36b12", + "trace_id": "1e57b752bc6e4544bbaa246cd1d05dee", + "op": "http", + "data": { + "url": "http://localhost:8080/sockjs-node/info?t=1588601703755", + "status_code": 200, + "type": "xhr", + "method": "GET" + }, + "span_id": "b01b9f6349558cd1" + }, + { + "start_timestamp": 1588601261.535386, + "description": "Vue ", + "timestamp": 1588601261.544196, + "parent_span_id": "9312d0d18bf51736", + "trace_id": "1e57b752bc6e4544bbaa246cd1d05dee", + "op": "update", + "span_id": "b980d4dec78d7344" + } + ] +} +``` + +`measurements` + +_Optional_. An object containing standard/custom measurements with keys signifying the name of the measurement. + +- Standard measurement keys currently supported are from the following list taken from [here](https://github.com/getsentry/sentry/blob/a8c960a933d2ded5225841573d8fc426a482ca9c/static/app/utils/discover/fields.tsx#L654-L676). + +```json +[ + // Web + "fp", + "fcp", + "lcp", + "fid", + "cls", + "ttfb", + "ttfb.requesttime", + + // Mobile + "app_start_cold", + "app_start_warm", + "frames_total", + "frames_slow", + "frames_frozen", + + // React native + "frames_slow_rate", + "frames_frozen_rate", + "stall_count", + "stall_total_time", + "stall_longest_time", + "stall_percentage" +] +``` + +- For the well-known measurements listed above, Sentry automatically infers units. Custom measurements need units to be specified; if the units are missing, Relay will set them to `"none"` as a default. The full list of supported units is specified on [Relay's `MetricUnit`](https://getsentry.github.io/relay/relay_metrics/enum.MetricUnit.html). Sentry's event ingestion supports arbitrary custom units, but many SDKs will not expose a generic user-defined unit interface. + +```json +{ + "measurements": { + "lcp": { "value": 100 }, + "fp": { "value": 123 }, + "my.custom.metric": { "value": 456, "unit": "millisecond" } + } +} +``` ## Transaction Annotations -import "./properties/transaction_info.mdx"; +`transaction_info` + +_Recommended_. Additional information about the name of the transaction. + +```json +{ + "transaction_info": { + "source": "route" + } +} +``` + +`transaction_info.source` + +_Required_. This information is required by dynamic sampling. +Contains information about how the name of the transaction was determined. +This will be used by the server to decide whether or not to scrub identifiers +from the transaction name, or replace the entire name with a placeholder. The `source` should +only be set by integrations and not by developers directly. + +| Source | Description |
Examples
| +| ----------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | +| `custom` | User-defined name, see [`setTransactionName()`](https://docs.sentry.io/platforms/javascript/enriching-events/transaction-name/) | `my_transaction` | +| `url` | Raw URL, potentially containing identifiers. | `/auth/login/john123/`
`GET /auth/login/john123/` | +| `route` | Parametrized URL / route | `/auth/login/:userId/`
`GET /auth/login/{user}/` | +| `view` | Name of the view handling the request. | `UserListView` | +| `component` | Named after a software component, such as a function or class name. | `AuthLogin.login`
`LoginActivity.login_button` | +| `task` | Name of a background task (e.g. a Celery task) | `sentry.tasks.do_something` | +| `unknown` | _Value set by Relay for legacy SDKs. SDKs must not set this value explicitly._ | |