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

Commit

Permalink
ref(measurements): Link to Relay MetricUnit and update wording
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-auer committed May 3, 2022
1 parent 376660e commit befde18
Showing 1 changed file with 2 additions and 3 deletions.
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" }
}
}
```

0 comments on commit befde18

Please sign in to comment.