Respan instrumentation for Restate
This package uses Restate's invocation_context_managers extension point to
observe one attempt of a registered Service, VirtualObject, or Workflow handler.
It does not add durable operations, retry handlers, or wrap durable futures.
Restate keeps responsibility for replay, journaling, cancellation, serialization,
and extension-data cleanup.
Activate the instrumentor before registering handlers:
import restate
from respan import Respan
from respan_instrumentation_restate import RestateInstrumentor
respan = Respan(api_key="...", instrumentations=[RestateInstrumentor()])
greeter = restate.Service("Greeter")
@greeter.handler()
async def greet(ctx: restate.Context, name: str) -> str:
return f"Hello, {name}!"
The adapter records service and handler identity, attempt replay state, invocation ID, object/workflow key, scope, limit key, and idempotency key. Invocation IDs map to trace groups; object and workflow keys map to thread identifiers. Standard JSON inputs retain the complete JSON structure. Secret fields and credential-bearing URLs are redacted.
Request capture reads native JSON buffers without invoking serde callbacks again. Opaque custom serde and journal-codec input is omitted. The invocation hook does not expose the handler result, so it emits no response body or invented usage. A successful attempt has an OTel OK status; an exception has an ERROR status. Only status codes supplied by the native error are captured.
Set capture_content=False, TRACELOOP_TRACE_CONTENT=false, or the Respan
content context to disable request, metadata, and diagnostic content. Ambient and
supplied parent contexts both apply. A privacy veto remains in effect for the
observed ancestor chain, including completed ancestors, and clears content before
the attempt span ends. An unobserved local recording parent fails closed.
Sampling and OTel suppression are checked before request inspection. Telemetry
failures preserve the native handler result or exception and native cleanup.
The supported Restate range starts at 1.0.1 because Restate 1.0.0 was yanked for a
stability bug. respan-sdk>=2.7.0 supplies the required span-attribute module;
released 2.6.1 and 2.6.2 do not contain it. The package has been exercised with
Restate 1.0.1 and 1.0.5, and with the declared Respan and OTel dependency floors.
Metadata
Release files for respan-instrumentation-restate 0.2.0
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_restate-0.2.0.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_instrumentation_restate-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / respan_instrumentation_restate-0.2.0.tar.gz
| Download URL | respan_instrumentation_restate-0.2.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f6187d9db029b8b1f97e4c9d73b758c47a5c6f8719de7e512a7b7859c6b886d
|
|
BLAKE2b-256 checksum How to use checksums |
de0ed60adb4e4ee63d38a0beea8360c72cfbac546a07d304f0fb685f2c0b6493
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / respan_instrumentation_restate-0.2.0-py3-none-any.whl
| Download URL | respan_instrumentation_restate-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2324e9945e6eeeec2366e057bdc238dd90def84f5dc96fb83f3404088e7a1301
|
|
BLAKE2b-256 checksum How to use checksums |
8aef2106bdb8984f501da3ad5118b5ed4c49840724a8349856565cc780b234b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency log