We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9cc0911 + 94fb242 commit da51a1bCopy full SHA for da51a1b
README.md
@@ -147,11 +147,11 @@ final span = tracer.startSpan('doingWork');
147
span.end();
148
```
149
150
-To create children spans, you must set the parent span as "current", and execute work within `withContext`.
+To create children spans, use `Context.withSpan` and `Context.execute()` to execute work with a given span.
151
152
```dart
153
final checkoutSpan = tracer.startSpan('checkout');
154
-withContext(setSpan(Context.current, checkoutSpan), () {
+Context.current.withSpan(checkoutSpan).execute(() {
155
final ringUpSpan = tracer.startSpan('ringUp');
156
...
157
ringUpSpan.end();
0 commit comments