Skip to main content

Respan instrumentation for Apache Burr

This package attaches a Burr lifecycle adapter when ApplicationBuilder.build() or abuild() is called. It supports Apache Burr 0.42 and maps Burr's own execution model:

  • application execution methods (run, arun, iterate, streaming methods) become workflow spans
  • state-machine actions become task spans with their declared reads, writes, tags, inputs, sequence ID, result, and state transition
  • Burr custom ActionSpan instances become nested task spans
  • Burr stream lifecycle callbacks become span events
  • attributes logged through Burr's tracing API are retained in Respan metadata

Burr application IDs are mapped to Respan trace-group identifiers and Burr partition keys are mapped to thread identifiers.

Install respan-ai alongside this package when using the unified Respan entry point below. Activate Respan before building the application:

from burr.core import ApplicationBuilder, Result, State, action, default, expr
from respan import Respan
from respan_instrumentation_burr import BurrInstrumentor

respan = Respan(
    api_key="...",
    instrumentations=[BurrInstrumentor()],
)


@action(reads=["count"], writes=["count"])
def increment(state: State) -> State:
    return state.update(count=state["count"] + 1)


result = Result("count").with_name("result")

app = (
    ApplicationBuilder()
    .with_identifiers(app_id="counter-app", partition_key="user-42")
    .with_actions(increment, result)
    .with_transitions(("increment", "increment", expr("count < 2")))
    .with_transitions(("increment", "result", default))
    .with_entrypoint("increment")
    .with_state(count=0)
    .build()
)

try:
    _, _, state = app.run(halt_after=["result"])
    print(state["count"])
finally:
    respan.shutdown()

Set capture_content=False to retain Burr operation identity and OTel status while omitting state, action inputs/results, stream items, logged attributes, and exception messages, stack traces, and events. The adapter also honors TRACELOOP_TRACE_CONTENT=false, RESPAN_TRACE_CONTENT=false, Respan's content context, and OTel suppression. Sampling is decided before content is read. A capture veto remains in force for descendants and cannot be widened later in the same execution. Already-recording local parents that predate the adapter's privacy observation use a private bound.

Activate multiple owners with the same content setting to share one adapter. A conflicting setting raises RuntimeError; the active setting stays in force. Deactivation restores only wrappers this package still owns. Built applications retain a disabled adapter, and native build results, exceptions, and streaming containers keep their original behavior.

The adapter records structured Burr state and logged attributes, including nested histories, schemas, arguments, and vectors. It does not infer model calls, token usage, or HTTP status from application actions. Custom span output is not invented when Burr provides no result. The stream metadata retains the first 32 items and its total item count; item events retain each received item. Fully consume streams or call their native get() method to deliver Burr's terminal lifecycle callbacks. Unknown Python objects are represented by their type; arbitrary iterators are never consumed for telemetry.

Metadata

Release files for respan-instrumentation-burr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for respan-instrumentation-burr 0.2.0
File Size Uploaded
respan_instrumentation_burr-0.2.0.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for respan-instrumentation-burr 0.2.0
File Interpreter ABI Platform
respan_instrumentation_burr-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / respan_instrumentation_burr-0.2.0.tar.gz

Download URL respan_instrumentation_burr-0.2.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b7099d663216f98edf80c13f516616d317a12ea82d1dac7a4762a8c51038e4cb
BLAKE2b-256 checksum
How to use checksums
2fdd6963098adcfb197c268fab49143d805152dc149a7502f109acde2ca739a8
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

Release files / respan_instrumentation_burr-0.2.0-py3-none-any.whl

Download URL respan_instrumentation_burr-0.2.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d4563accd8544ce83b4c046d86a74239bec2c1c0e387f9c732397ad27d2accb
BLAKE2b-256 checksum
How to use checksums
f58b6f95016de5a09cc6b7d9d67dd07c285a95e2105d3acb84273c6dd38c8af7
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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page