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
* WIP nexus typescript public preview changes
* remove experimental notice
* fix broken link
* replace a couple more usages of old createNexusClient function
---------
Co-authored-by: Jwahir Sundai <jwahir.sundai@temporal.io>
@@ -440,6 +444,36 @@ For **synchronous Nexus Operations** the following are reported in the caller's
440
444
441
445
:::
442
446
447
+
### OpenTelemetry
448
+
449
+
The `@temporalio/interceptors-opentelemetry` package supports Nexus Operations, providing automatic trace context propagation across Nexus boundaries from the caller Workflow to the handler.
450
+
451
+
The easiest way to enable it is with the `OpenTelemetryPlugin`, which auto-registers Nexus interceptors alongside Activity and Workflow interceptors:
-**Caller side:**`StartNexusOperation:service/operation` — created when the caller Workflow starts a Nexus Operation.
471
+
-**Handler side:**`RunStartNexusOperation:service/operation` and `RunCancelNexusOperation:service/operation` — created when the handler processes the operation. These spans are children of the caller span, linked via trace context propagated in Nexus request headers.
472
+
473
+
See the [interceptors-opentelemetry sample](https://github.com/temporalio/samples-typescript/tree/main/interceptors-opentelemetry) for a complete example.
474
+
475
+
For custom interceptor logic beyond tracing (e.g., logging, authorization), see [Nexus interceptor registration](/develop/typescript/workers/interceptors#nexus-interceptor-registration).
476
+
443
477
## Learn more
444
478
445
479
- Read the high-level description of the [Temporal Nexus feature](/evaluate/nexus) and watch the [Nexus keynote and demo](https://youtu.be/qqc2vsv1mrU?feature=shared&t=2082).
## Register an Interceptor {#register-interceptor}
78
112
79
113
Registering an interceptor means providing it to the SDK so Temporal can invoke it when matching Client or Worker calls occur. Once registered, it runs in the call path and can observe or modify request and response data.
Pass an array of factory functions to `interceptors.nexus`.
168
+
Each factory receives an [`OperationContext`](https://typescript.temporal.io/api/classes/nexus.OperationContext) and returns an object with optional `inbound` and `outbound` interceptors.
0 commit comments