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
@@ -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.
Copy file name to clipboardExpand all lines: docs/encyclopedia/activities/activity-operations.mdx
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ temporal activity pause \
77
77
--reason "Downstream API is down, pausing until recovery"
78
78
```
79
79
80
-
See the [CLI reference for `temporal activity pause`](/cli/activity#pause) for all options, including `--activity-type` for targeting by type.
80
+
See the [CLI reference for `temporal activity pause`](/cli/activity#pause) for all options.
81
81
82
82
### Detect Pause in Activity code
83
83
@@ -104,11 +104,9 @@ Your Activity code may need to handle these cases differently, for example relea
104
104
105
105
-**A Paused Activity can still time out.** Pause doesn't stop or extend the [Schedule-To-Close Timeout](/encyclopedia/detecting-activity-failures#schedule-to-close-timeout). Use [`update-options`](#update-options) to adjust the timeout if needed.
106
106
-**Pause won't interrupt an Activity that doesn't Heartbeat.** The current execution runs to completion, which could take up to the full [Start-To-Close Timeout](/encyclopedia/detecting-activity-failures#start-to-close-timeout).
107
-
-**Pausing by `--activity-type` doesn't prevent new Activities of that type from running.** The command Pauses Activities that are pending when it runs. Activities that start afterward are unaffected.
108
-
109
107
### Limitations
110
108
111
-
-**Pause doesn't support bulk operations.** Unlike Unpause, Reset, and Update Options, there's no `--query` flag. You can only Pause Activities within a single Workflow, by Activity Id or by Activity type.
109
+
-**Pause operates on individual Activities by ID within a single Workflow.** Unlike Unpause, Reset, and Update Options, there's no `--query` flag. To pause multiple Activities, issue separate commands for each Activity ID.
112
110
-**No Namespace-wide query for Paused Activities.** You must know the Workflow Id. See [Observability](#observability).
113
111
114
112
## Unpause {#unpause}
@@ -206,7 +204,6 @@ Your Activity code may need to handle these cases differently, for example savin
206
204
-**Heartbeat details are preserved by default.** If your Activity uses Heartbeat details for progress tracking and you want a clean restart, pass `--reset-heartbeats`.
207
205
-**Reset won't interrupt an Activity that doesn't Heartbeat.** The current execution runs to completion, which could take up to the full [Start-To-Close Timeout](/encyclopedia/detecting-activity-failures#start-to-close-timeout). If the Activity had already retried (attempt > 1), the Temporal Service rejects the current execution's result because Reset changed the expected attempt number. The Activity waits for its Start-To-Close Timeout to expire before a new execution is scheduled.
208
206
-**`--restore-original-options` restores the Activity's original configuration.** It reverts timeouts, Retry Policy, and Task Queue to the values from when the Activity was first scheduled.
209
-
-**Resetting by `--activity-type` or `--match-all` doesn't affect new Activities of that type.** The command Resets Activities that are pending when it runs. Activities that start afterward are unaffected.
210
207
-**Bulk Reset can overwhelm downstream services.** When using `--query` to Reset Activities across many Workflows, use `--jitter` to stagger the restart times.
211
208
212
209
## Update Options {#update-options}
@@ -247,7 +244,6 @@ See the [CLI reference for `temporal activity update-options`](/cli/activity#upd
247
244
### Important considerations
248
245
249
246
-**Changes to a running Activity take effect on the next execution, not the current one.** If you need the change to apply immediately, the Activity must finish or fail its current execution first.
250
-
-**Updating by `--activity-type` or `--match-all` doesn't affect new Activities of that type.** The command updates Activities that are pending when it runs. Activities that start afterward are unaffected.
251
247
-**`--restore-original-options` is batch-only.** This flag only works with `--query`. It's silently ignored in single-workflow mode. It can't be combined with other option changes in the same command.
252
248
253
249
### Limitations
@@ -265,7 +261,7 @@ The UI shows who performed an operation, when, and why (if a `--reason` was prov
265
261
266
262
### Find Paused Activities
267
263
268
-
The `TemporalPauseInfo`[Search Attribute](/search-attribute) is filterable by Activity type within a Workflow.
264
+
The `TemporalPauseInfo`[Search Attribute](/search-attribute) is filterable within a Workflow.
269
265
270
266
There's no Namespace-wide query to find all Paused Activities across Workflows.
0 commit comments