Skip to content

Commit 1963159

Browse files
authored
Document span client reports (#11283)
1 parent b36541b commit 1963159

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

develop-docs/sdk/client-reports.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,29 @@ filtered or filtered by by dynamic sampling _at a relay_. Client SDKs must never
118118
emit these _unless_ they are operating as a relay. The reason codes for these
119119
need to match the reason codes that relay would emit directly to Sentry.
120120

121+
### Special Case for Span Outcomes
122+
123+
When a transaction is dropped, we record an additional `span` category event containing the number of the spans inside the transaction plus one.
124+
The plus one stems from the fact that Relay extracts an additional span from the transaction. If a transaction contains no spans, we still want to report one dropped transaction and one dropped span. This also applies to transactions that are not sampled.
125+
If certain spans are dropped in `beforeSendTransaction`, an event processor etc., we also want to report those.
126+
127+
```json
128+
{
129+
"discarded_events": [
130+
{
131+
"reason": "queue_overflow",
132+
"category": "transaction",
133+
"quantity": 1
134+
},
135+
{
136+
"reason": "queue_overflow",
137+
"category": "span",
138+
"quantity": 3 // 2 spans + 1 span (the transaction itself should be counted)
139+
}
140+
]
141+
}
142+
```
143+
121144
## SDK Side Recommendations
122145

123146
The client reports feature doesn't expect 100 percent correct numbers, and it is

develop-docs/sdk/rate-limiting.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ While these [data categories](https://github.com/getsentry/relay/blob/master/rel
8787
- `default`: Events with an event_type not listed explicitly below.
8888
- `error`: Error events.
8989
- `transaction`: Transaction type events.
90+
- `span`: Span type events.
9091
- `security`: Events with event_type `csp`, `hpkp`, `expectct`, `expectstaple`
9192
- `attachment`: Attachment bytes stored (unused for rate limiting)
9293
- `session`: Session update events

0 commit comments

Comments
 (0)