respan-instrumentation-temporal
Respan instrumentation for the Temporal Python SDK. It adapts Temporal's official replay-aware OpenTelemetry interceptor instead of patching workflow execution directly, preserving Temporal context propagation and replay semantics while emitting canonical Respan workflow and task fields.
The instrumentor injects its interceptor into Client.connect() automatically. The same interceptor is exposed as instrumentor.interceptor for Temporal test environments and custom client factories that accept an explicit interceptors list.
Install
pip install respan-ai respan-instrumentation-temporal temporalio
Usage
from temporalio.client import Client
from respan import Respan
from respan_instrumentation_temporal import TemporalInstrumentor
instrumentor = TemporalInstrumentor()
respan = Respan(instrumentations=[instrumentor])
# The interceptor is appended automatically and is inherited by workers
# created from this client.
client = await Client.connect("localhost:7233")
# Flush and shut down Respan after workers and clients have closed.
respan.flush()
respan.shutdown()
For WorkflowEnvironment:
from temporalio.testing import WorkflowEnvironment
environment = await WorkflowEnvironment.start_time_skipping(
interceptors=[instrumentor.interceptor]
)
If an explicit Temporal TracingInterceptor is already present, Respan does
not append a second tracing interceptor, avoiding duplicate spans. Multiple
instrumentor instances share one patch and the final owner restores only the
wrapper it installed, preserving later third-party patches.
Content capture
TemporalInstrumentor(capture_content=False)
Content capture includes workflow/activity arguments and Temporal identifiers when the relevant interceptor input exposes them. With capture disabled, spans retain stable operation and workflow/activity type information but omit arguments and IDs. Temporal headers are never captured. Errors record OpenTelemetry error status plus backend-visible status_code and error.message fields. activate() and deactivate() are idempotent.
Metadata
Release files for respan-instrumentation-temporal 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| respan_instrumentation_temporal-0.1.1.tar.gz | 9.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_instrumentation_temporal-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 kB
Release files / respan_instrumentation_temporal-0.1.1.tar.gz
| Download URL | respan_instrumentation_temporal-0.1.1.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf2f70c89c168267fcda11cb4d9944d428b85af4de6d33c0fcb87a7b3e161b01
|
|
BLAKE2b-256 checksum How to use checksums |
9e3c26336c89d8826e91547b6d94e290ff299a52aba93494f5b0b38bec53cb38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / respan_instrumentation_temporal-0.1.1-py3-none-any.whl
| Download URL | respan_instrumentation_temporal-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e172677b72b6b7ec71f4bac889af6659dedbfeba3ae077b5c9395fb577fd1e7
|
|
BLAKE2b-256 checksum How to use checksums |
0308fbaa8373f8cca84fd68e1ec6300b34a4334a6e9787653e1c1e3aa9c7779a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|