Skip to content

Commit

Permalink
feat(server): add client SDK name to envelope metrics (#4183)
Browse files Browse the repository at this point in the history
Add SDK client name without version number to envelope metrics
  • Loading branch information
Litarnus authored Oct 30, 2024
1 parent a9c0a49 commit e9213e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion relay-server/src/endpoints/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,12 @@ pub async fn handle_envelope(
state: &ServiceState,
envelope: Box<Envelope>,
) -> Result<Option<EventId>, BadStoreRequest> {
let client_name = envelope.meta().client_name().unwrap_or("proprietary");
for item in envelope.items() {
metric!(
histogram(RelayHistograms::EnvelopeItemSize) = item.payload().len() as u64,
item_type = item.ty().name()
item_type = item.ty().name(),
sdk = client_name,
)
}

Expand Down

0 comments on commit e9213e8

Please sign in to comment.