Skip to main content

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.Service
  • restate.VirtualObject
  • restate.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

respan_instrumentation_restate-0.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Hashes for respan_instrumentation_restate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 95f263d9d7f78dc3d5c7add239933034550b6dc0257bacbc1c688507966929e4
MD5 9a5d173a7ad4e743e84abc6eefa2222d
BLAKE2b-256 a38c9b2597fd3df61bcd1ed65ddca7b153502c8dc88e4acb6bb1885f66081d3e

See more details on using hashes here.

File details

Details for the file respan_instrumentation_restate-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for respan_instrumentation_restate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea0869e4bcda1f8a24529d384f6f4983e7b166cf9dff3ad840a127cd9a1a59b3
MD5 e6fe2adef7510ba04551a480c99db4dc
BLAKE2b-256 c93be3dd7475f77da85b187a97c276e06c2247294ad8fd4e825eccf04c7e06e4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page