File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import 'dart:async';
33import 'package:opentelemetry/api.dart' ;
44import 'package:opentelemetry/sdk.dart'
55 show ConsoleExporter, SimpleSpanProcessor, TracerProviderBase;
6+ import 'package:opentelemetry/src/api/context/zone_context.dart' ;
67import 'package:opentelemetry/src/experimental_api.dart'
78 show globalContextManager, registerGlobalContextManager, ZoneContextManager;
89
@@ -15,7 +16,7 @@ void main(List<String> args) async {
1516 registerGlobalContextManager (cm);
1617
1718 final span = tp.getTracer ('instrumentation-name' ).startSpan ('test-span-0' );
18- await contextWithSpan (cm.active, span).run ((_) => test ());
19+ await ( contextWithSpan (cm.active, span) as ZoneContext ).run ((_) => test ());
1920 span.end ();
2021}
2122
Original file line number Diff line number Diff line change @@ -74,8 +74,6 @@ abstract class Context {
7474 'This method will be removed in 0.19.0. Propagate [Context] as an argument to [fn].' )
7575 R execute <R >(R Function () fn);
7676
77- R run <R >(R Function (Context context) fn);
78-
7977 /// Get the [Span] attached to this [Context] , or an invalid, [Span] if no such
8078 /// [Span] exists.
8179 @Deprecated (
You can’t perform that action at this time.
0 commit comments