Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
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
41 changes: 41 additions & 0 deletions src/docs/sdk/event-payloads/properties/measurements.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
`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
"stall_count",
"stall_total_time",
"stall_longest_time"
]
```

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.


```json
{
"measurements": {
"lcp": { "value": 100 },
"fp": { "value": 123 },
"my.custom.metric": { "value": 456, "unit": "ms" }
}
}
```
2 changes: 2 additions & 0 deletions src/docs/sdk/event-payloads/transaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ import "./properties/status.mdx";
```

import "./properties/spans.mdx";

import "./properties/measurements.mdx";