File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -205,15 +205,6 @@ impl<T: Send + OutboundWasiHttpHandler> WasiHttpView for Data<T> {
205
205
where
206
206
Self : Sized ,
207
207
{
208
- let current_span = tracing:: Span :: current ( ) ;
209
- let uri = request. request . uri ( ) ;
210
- if let Some ( authority) = uri. authority ( ) {
211
- current_span. record ( "server.address" , authority. host ( ) ) ;
212
- if let Some ( port) = authority. port ( ) {
213
- current_span. record ( "server.port" , port. as_u16 ( ) ) ;
214
- }
215
- }
216
-
217
208
spin_telemetry:: inject_trace_context ( & mut request. request ) ;
218
209
T :: send_request ( self , request)
219
210
}
Original file line number Diff line number Diff line change @@ -706,6 +706,15 @@ impl OutboundWasiHttpHandler for HttpRuntimeData {
706
706
return Self :: chain_request ( data, request, component_id) ;
707
707
}
708
708
709
+ let current_span = tracing:: Span :: current ( ) ;
710
+ let uri = request. request . uri ( ) ;
711
+ if let Some ( authority) = uri. authority ( ) {
712
+ current_span. record ( "server.address" , authority. host ( ) ) ;
713
+ if let Some ( port) = authority. port ( ) {
714
+ current_span. record ( "server.port" , port. as_u16 ( ) ) ;
715
+ }
716
+ }
717
+
709
718
// TODO: This is a temporary workaround to make sure that outbound task is instrumented.
710
719
// Once Wasmtime gives us the ability to do the spawn ourselves we can just call .instrument
711
720
// and won't have to do this workaround.
You can’t perform that action at this time.
0 commit comments