File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -410,7 +410,7 @@ fn emit_envelope_metrics(envelope: &Envelope) {
410410 item_type = item. ty( ) . name( )
411411 ) ;
412412 metric ! (
413- counter( RelayCounters :: EnvelopeItems ) += 1 ,
413+ counter( RelayCounters :: EnvelopeItems ) += item . item_count ( ) . unwrap_or ( 1 ) ,
414414 item_type = item. ty( ) . name( ) ,
415415 sdk = client_name. name( ) ,
416416 ) ;
Original file line number Diff line number Diff line change @@ -678,7 +678,10 @@ pub enum RelayCounters {
678678 /// - `handling`: Either `"success"` if the envelope was handled correctly, or `"failure"` if
679679 /// there was an error or bug.
680680 EnvelopeRejected ,
681- /// Number of items we processed per envelope.
681+ /// Number of total envelope items we received.
682+ ///
683+ /// Note: This does not count raw items, it counts the logical amount of items,
684+ /// e.g. a single item container counts all its contained items.
682685 EnvelopeItems ,
683686 /// Number of bytes we processed per envelope item.
684687 EnvelopeItemBytes ,
You can’t perform that action at this time.
0 commit comments