Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

ref(measurements): Link to Relay MetricUnit and update wording [INGEST-1131] #573

Merged
merged 1 commit into from
May 3, 2022
Merged
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
5 changes: 2 additions & 3 deletions src/docs/sdk/event-payloads/properties/measurements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ Standard measurement keys currently supported are from the following list taken
]
```

Custom measurements need units to be specified. Units currently supported are durations from the list `["ns" , "ms" , "s"]` taken from [here](https://github.com/getsentry/relay/blob/1e45a8817e45408ecbdbd3f0a679a5f5e4885290/relay-metrics/src/protocol.rs#L14-L21). Note that in the future we will extend the available units (for instance, memory units) but we will not implement a generic user-defined unit interface.

For the well-known measurements listed above, Sentry automatically infers units. Custom measurements need units to be specified, defaulting to `"none"` if missing. 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": "ms" }
"my.custom.metric": { "value": 456, "unit": "millisecond" }
}
}
```