You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/opentelemetry-node/README.md
+8
Original file line number
Diff line number
Diff line change
@@ -92,6 +92,14 @@ provider.register()
92
92
## Examples
93
93
See how to automatically instrument [http](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/http) and [gRPC](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/grpc) using node-sdk.
94
94
95
+
## Experimental API methods
96
+
97
+
#### withSpanAsync
98
+
99
+
The `NodeTracer` expose a method called `withSpanAsync` that allows you to set a current span in the context of a `async` function. This previously was a problem with `withSpan` because its synchronous behavior, read about that in [this issue](https://github.com/open-telemetry/opentelemetry-js/issues/752).
100
+
This method have two drawback:
101
+
- strict requirement of the `AsyncHooksScopeManager`, you **cannot** use it without.
102
+
- the underlying implementation inside `AsyncHooksScopeManager` is experimental, so is this method, please open an issue if you have a problem with it.
95
103
96
104
## Useful links
97
105
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
`Using withAsync without AsyncHookContextManager doesn't work, please refer to`
65
+
`Using withAsync without AsyncHookContextManager doesn't work, please refer to https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-node#withspanasync`
0 commit comments