File tree 3 files changed +17
-1
lines changed 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -1530,7 +1530,9 @@ impl EnvelopeProcessor {
1530
1530
1531
1531
metric ! (
1532
1532
counter( RelayCounters :: EventTransactionSource ) += 1 ,
1533
- source = & source. to_string( )
1533
+ source = & source. to_string( ) ,
1534
+ sdk = state. envelope. meta( ) . client_name( ) . unwrap_or( "proprietary" ) ,
1535
+ platform = event. platform. as_str( ) . unwrap_or( "other" ) ,
1534
1536
) ;
1535
1537
}
1536
1538
}
Original file line number Diff line number Diff line change @@ -204,10 +204,21 @@ pub struct RequestMeta<D = PartialDsn> {
204
204
205
205
impl < D > RequestMeta < D > {
206
206
/// Returns the client that sent this event (Sentry SDK identifier).
207
+ ///
208
+ /// The client is formatted as `"sdk/version"`, for example `"raven-node/2.6.3"`.
207
209
pub fn client ( & self ) -> Option < & str > {
208
210
self . client . as_deref ( )
209
211
}
210
212
213
+ /// Returns the name of the client that sent the event without version.
214
+ ///
215
+ /// If the client is not sent in standard format, this method returns `None`.
216
+ pub fn client_name ( & self ) -> Option < & str > {
217
+ let client = self . client ( ) ?;
218
+ let ( name, _version) = client. split_once ( '/' ) ?;
219
+ Some ( name)
220
+ }
221
+
211
222
/// Returns the protocol version of the event payload.
212
223
pub fn version ( & self ) -> u16 {
213
224
self . version
Original file line number Diff line number Diff line change @@ -450,6 +450,9 @@ pub enum RelayCounters {
450
450
/// The number of transaction events processed by the source of the transaction name.
451
451
///
452
452
/// This metric is tagged with:
453
+ /// - `platform`: The event's platform, such as `"javascript"`.
454
+ /// - `sdk`: The name of the Sentry SDK sending the transaction. This tag is only set for
455
+ /// Sentry's SDKs and defaults to "proprietary".
453
456
/// - `source`: The source of the transaction name on the client. See the [transaction source
454
457
/// documentation](https://develop.sentry.dev/sdk/event-payloads/properties/transaction_info/)
455
458
/// for all valid values.
You can’t perform that action at this time.
0 commit comments