@@ -19,6 +19,7 @@ use tracking::create_tracking_id;
19
19
const NANOS_MULTIPLE : i32 = 10000000i32 ;
20
20
21
21
const RPC_SYSTEM_GRPC : & ' static str = "grpc" ;
22
+ const RPC_SERVICE_SHIPPING : & ' static str = "oteldemo.ShippingService" ;
22
23
const RPC_GRPC_STATUS_CODE_OK : i64 = 0 ;
23
24
const RPC_GRPC_STATUS_CODE_UNKNOWN : i64 = 2 ;
24
25
@@ -75,6 +76,8 @@ impl ShippingService for ShippingServer {
75
76
. with_kind ( SpanKind :: Server )
76
77
. start_with_context ( & tracer, & parent_cx) ;
77
78
span. set_attribute ( KeyValue :: new ( semconv:: trace:: RPC_SYSTEM , RPC_SYSTEM_GRPC ) ) ;
79
+ span. set_attribute ( KeyValue :: new ( semconv:: trace:: RPC_SERVICE , RPC_SERVICE_SHIPPING ) ) ;
80
+ span. set_attribute ( KeyValue :: new ( semconv:: trace:: RPC_METHOD , "GetQuote" ) ) ;
78
81
79
82
span. add_event ( "Processing get quote request" . to_string ( ) , vec ! [ ] ) ;
80
83
span. set_attribute ( KeyValue :: new (
@@ -128,6 +131,8 @@ impl ShippingService for ShippingServer {
128
131
. with_kind ( SpanKind :: Server )
129
132
. start_with_context ( & tracer, & parent_cx) ;
130
133
span. set_attribute ( KeyValue :: new ( semconv:: trace:: RPC_SYSTEM , RPC_SYSTEM_GRPC ) ) ;
134
+ span. set_attribute ( KeyValue :: new ( semconv:: trace:: RPC_SERVICE , RPC_SERVICE_SHIPPING ) ) ;
135
+ span. set_attribute ( KeyValue :: new ( semconv:: trace:: RPC_METHOD , "ShipOrder" ) ) ;
131
136
132
137
span. add_event ( "Processing shipping order request" . to_string ( ) , vec ! [ ] ) ;
133
138
0 commit comments