@@ -650,59 +650,16 @@ impl Getter for Event {
650
650
"user.geo.region" => self . user . value ( ) ?. geo . value ( ) ?. region . as_str ( ) ?. into ( ) ,
651
651
"user.geo.subdivision" => self . user . value ( ) ?. geo . value ( ) ?. subdivision . as_str ( ) ?. into ( ) ,
652
652
"request.method" => self . request . value ( ) ?. method . as_str ( ) ?. into ( ) ,
653
- "sdk.name" => self . client_sdk . value ( ) ?. name . as_str ( ) ?. into ( ) ,
654
- "sdk.version" => self . client_sdk . value ( ) ?. version . as_str ( ) ?. into ( ) ,
655
653
656
654
// Partial implementation of contexts.
657
- "contexts.device.arch" => self . context :: < DeviceContext > ( ) ?. arch . as_str ( ) ?. into ( ) ,
658
- "contexts.device.battery_level" => self
659
- . context :: < DeviceContext > ( ) ?
660
- . battery_level
661
- . value ( ) ?
662
- . into ( ) ,
663
- "contexts.device.brand" => self . context :: < DeviceContext > ( ) ?. brand . as_str ( ) ?. into ( ) ,
664
- "contexts.device.charging" => self . context :: < DeviceContext > ( ) ?. charging . value ( ) ?. into ( ) ,
665
- "contexts.device.family" => self . context :: < DeviceContext > ( ) ?. family . as_str ( ) ?. into ( ) ,
666
- "contexts.device.locale" => self . context :: < DeviceContext > ( ) ?. locale . as_str ( ) ?. into ( ) ,
667
- "contexts.device.online" => self . context :: < DeviceContext > ( ) ?. online . value ( ) ?. into ( ) ,
668
- "contexts.device.orientation" => self
669
- . context :: < DeviceContext > ( ) ?
670
- . orientation
671
- . as_str ( ) ?
672
- . into ( ) ,
673
655
"contexts.device.name" => self . context :: < DeviceContext > ( ) ?. name . as_str ( ) ?. into ( ) ,
674
- "contexts.device.screen_density" => self
675
- . context :: < DeviceContext > ( ) ?
676
- . screen_density
677
- . value ( ) ?
678
- . into ( ) ,
679
- "contexts.device.screen_dpi" => {
680
- self . context :: < DeviceContext > ( ) ?. screen_dpi . value ( ) ?. into ( )
681
- }
682
- "contexts.device.screen_width_pixels" => self
683
- . context :: < DeviceContext > ( ) ?
684
- . screen_width_pixels
685
- . value ( ) ?
686
- . into ( ) ,
687
- "contexts.device.screen_height_pixels" => self
688
- . context :: < DeviceContext > ( ) ?
689
- . screen_height_pixels
690
- . value ( ) ?
691
- . into ( ) ,
692
- "contexts.device.simulator" => {
693
- self . context :: < DeviceContext > ( ) ?. simulator . value ( ) ?. into ( )
694
- }
695
- "contexts.os.build" => self . context :: < OsContext > ( ) ?. build . as_str ( ) ?. into ( ) ,
696
- "contexts.os.kernel_version" => {
697
- self . context :: < OsContext > ( ) ?. kernel_version . as_str ( ) ?. into ( )
698
- }
656
+ "contexts.device.family" => self . context :: < DeviceContext > ( ) ?. family . as_str ( ) ?. into ( ) ,
699
657
"contexts.os.name" => self . context :: < OsContext > ( ) ?. name . as_str ( ) ?. into ( ) ,
700
658
"contexts.os.version" => self . context :: < OsContext > ( ) ?. version . as_str ( ) ?. into ( ) ,
701
659
"contexts.browser.name" => self . context :: < BrowserContext > ( ) ?. name . as_str ( ) ?. into ( ) ,
702
660
"contexts.browser.version" => {
703
661
self . context :: < BrowserContext > ( ) ?. version . as_str ( ) ?. into ( )
704
662
}
705
- "contexts.device.uuid" => self . context :: < DeviceContext > ( ) ?. uuid . value ( ) ?. into ( ) ,
706
663
"contexts.trace.status" => self
707
664
. context :: < TraceContext > ( ) ?
708
665
. status
@@ -760,7 +717,6 @@ mod tests {
760
717
use chrono:: { TimeZone , Utc } ;
761
718
use relay_protocol:: { ErrorKind , Map , Meta } ;
762
719
use similar_asserts:: assert_eq;
763
- use uuid:: uuid;
764
720
765
721
use super :: * ;
766
722
use crate :: protocol:: { Headers , IpAddr , JsonLenientString , PairList , TagEntry } ;
@@ -1042,11 +998,6 @@ mod tests {
1042
998
segment : Annotated :: new ( "user-seg" . into ( ) ) ,
1043
999
..Default :: default ( )
1044
1000
} ) ,
1045
- client_sdk : Annotated :: new ( ClientSdkInfo {
1046
- name : Annotated :: new ( "sentry-javascript" . into ( ) ) ,
1047
- version : Annotated :: new ( "1.87.0" . into ( ) ) ,
1048
- ..Default :: default ( )
1049
- } ) ,
1050
1001
exceptions : Annotated :: new ( Values {
1051
1002
values : Annotated :: new ( vec ! [ Annotated :: new( Exception {
1052
1003
value: Annotated :: new( JsonLenientString :: from(
@@ -1077,12 +1028,6 @@ mod tests {
1077
1028
name : Annotated :: new ( "iphone" . to_string ( ) ) ,
1078
1029
family : Annotated :: new ( "iphone-fam" . to_string ( ) ) ,
1079
1030
model : Annotated :: new ( "iphone7,3" . to_string ( ) ) ,
1080
- screen_dpi : Annotated :: new ( 560 ) ,
1081
- screen_width_pixels : Annotated :: new ( 1920 ) ,
1082
- screen_height_pixels : Annotated :: new ( 1080 ) ,
1083
- locale : Annotated :: new ( "US" . into ( ) ) ,
1084
- uuid : Annotated :: new ( uuid ! ( "abadcade-feed-dead-beef-baddadfeeded" ) ) ,
1085
- charging : Annotated :: new ( true ) ,
1086
1031
..DeviceContext :: default ( )
1087
1032
} ) ;
1088
1033
contexts. add ( OsContext {
@@ -1134,42 +1079,6 @@ mod tests {
1134
1079
event. get_value( "event.tags.custom" )
1135
1080
) ;
1136
1081
assert_eq ! ( None , event. get_value( "event.tags.doesntexist" ) ) ;
1137
- assert_eq ! (
1138
- Some ( Val :: String ( "sentry-javascript" ) ) ,
1139
- event. get_value( "event.sdk.name" )
1140
- ) ;
1141
- assert_eq ! (
1142
- Some ( Val :: String ( "1.87.0" ) ) ,
1143
- event. get_value( "event.sdk.version" )
1144
- ) ;
1145
- assert_eq ! (
1146
- Some ( Val :: String ( "17.4.0" ) ) ,
1147
- event. get_value( "event.contexts.os.kernel_version" )
1148
- ) ;
1149
- assert_eq ! (
1150
- Some ( Val :: I64 ( 560 ) ) ,
1151
- event. get_value( "event.contexts.device.screen_dpi" )
1152
- ) ;
1153
- assert_eq ! (
1154
- Some ( Val :: Bool ( true ) ) ,
1155
- event. get_value( "event.contexts.device.charging" )
1156
- ) ;
1157
- assert_eq ! (
1158
- Some ( Val :: U64 ( 1920 ) ) ,
1159
- event. get_value( "event.contexts.device.screen_width_pixels" )
1160
- ) ;
1161
- assert_eq ! (
1162
- Some ( Val :: U64 ( 1080 ) ) ,
1163
- event. get_value( "event.contexts.device.screen_height_pixels" )
1164
- ) ;
1165
- assert_eq ! (
1166
- Some ( Val :: String ( "US" ) ) ,
1167
- event. get_value( "event.contexts.device.locale" )
1168
- ) ;
1169
- assert_eq ! (
1170
- Some ( Val :: Uuid ( uuid!( "abadcade-feed-dead-beef-baddadfeeded" ) ) ) ,
1171
- event. get_value( "event.contexts.device.uuid" )
1172
- ) ;
1173
1082
}
1174
1083
1175
1084
#[ test]
0 commit comments