File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,7 @@ use tracing_opentelemetry::OpenTelemetrySpanExt;
9
9
use crate :: InstanceState ;
10
10
11
11
impl wasi_otel:: Host for InstanceState {
12
- async fn on_start (
13
- & mut self ,
14
- span_data : wasi_otel:: SpanData ,
15
- _parent : wasi_otel:: SpanContext ,
16
- ) -> Result < ( ) > {
12
+ async fn on_start ( & mut self , context : wasi_otel:: SpanContext ) -> Result < ( ) > {
17
13
let mut state = self . state . write ( ) . unwrap ( ) ;
18
14
19
15
// Before we do anything make sure we track the original host span ID for reparenting
@@ -28,7 +24,7 @@ impl wasi_otel::Host for InstanceState {
28
24
}
29
25
30
26
// Track the guest spans context in our ordered map
31
- let span_context: opentelemetry:: trace:: SpanContext = span_data . span_context . into ( ) ;
27
+ let span_context: opentelemetry:: trace:: SpanContext = context . into ( ) ;
32
28
state
33
29
. guest_span_contexts
34
30
. insert ( span_context. span_id ( ) , span_context) ;
@@ -51,7 +47,7 @@ impl wasi_otel::Host for InstanceState {
51
47
Ok ( ( ) )
52
48
}
53
49
54
- async fn current_span_context ( & mut self ) -> Result < wasi_otel:: SpanContext > {
50
+ async fn outer_span_context ( & mut self ) -> Result < wasi_otel:: SpanContext > {
55
51
Ok ( tracing:: Span :: current ( )
56
52
. context ( )
57
53
. span ( )
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ interface tracing {
2
2
use wasi :clocks /wall-clock @ 0.2.0 . {datetime };
3
3
4
4
/// Called when a span is started.
5
- on-start : func (span : span-data , parent : span-context );
5
+ on-start : func (context : span-context );
6
6
7
7
/// Called when a span is ended.
8
8
on-end : func (span : span-data );
9
9
10
- /// Returns the current span context of the host.
11
- current -span-context: func () -> span-context ;
10
+ /// Returns the span context of the host.
11
+ outer -span-context: func () -> span-context ;
12
12
13
13
/// The data associated with a span.
14
14
record span-data {
You can’t perform that action at this time.
0 commit comments