Respan instrumentation for Restate
This package instruments the Restate Python SDK through its
invocation_context_managers extension point. It adds one span around each
handler invocation attempt registered on a:
restate.Servicerestate.VirtualObjectrestate.Workflow
The span records Restate-specific service, handler, invocation, replay, object/workflow key, scope, limit-key, and idempotency-key context. Request content is deserialized with the handler's configured Restate serde. Restate does not expose the serialized handler result to invocation context managers, so the adapter records completion status without inventing a response body.
Activate Respan 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}!"
Restate invocation IDs are mapped to Respan trace-group identifiers. Object
and workflow keys are mapped to thread identifiers so repeated invocations can
be correlated. Set capture_content=False to omit the deserialized request.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file respan_instrumentation_restate-0.1.0.tar.gz.
File metadata
- Download URL: respan_instrumentation_restate-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.3.2 CPython/3.13.12 Linux/6.17.0-35-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95f263d9d7f78dc3d5c7add239933034550b6dc0257bacbc1c688507966929e4
|
|
| MD5 |
9a5d173a7ad4e743e84abc6eefa2222d
|
|
| BLAKE2b-256 |
a38c9b2597fd3df61bcd1ed65ddca7b153502c8dc88e4acb6bb1885f66081d3e
|
File details
Details for the file respan_instrumentation_restate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: respan_instrumentation_restate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.3.2 CPython/3.13.12 Linux/6.17.0-35-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea0869e4bcda1f8a24529d384f6f4983e7b166cf9dff3ad840a127cd9a1a59b3
|
|
| MD5 |
e6fe2adef7510ba04551a480c99db4dc
|
|
| BLAKE2b-256 |
c93be3dd7475f77da85b187a97c276e06c2247294ad8fd4e825eccf04c7e06e4
|