Skip to main content

Respan OpenLIT instrumentation

respan-instrumentation-openlit sends OpenLIT's native OpenTelemetry spans through the active Respan tracer provider and normalizes them to the Respan span contract. It does not wrap provider calls a second time, so enabling this plugin does not create a duplicate Respan span around each OpenLIT span.

Install

pip install respan-ai respan-instrumentation-openlit

Use

from respan import Respan
from respan_instrumentation_openlit import OpenLITInstrumentor

respan = Respan(
    api_key="...",
    instrumentations=[OpenLITInstrumentor(capture_content=True)],
)

Activation calls openlit.init() with the existing OpenTelemetry provider, metrics and events disabled, and an offline empty pricing file. OpenLIT therefore owns provider/framework patching while Respan owns export. Pass a custom pricing_json if OpenLIT cost calculation is required.

capture_content=False disables OpenLIT message capture and strips any content attributes from pre-existing OpenLIT spans before export. disabled_instrumentors is forwarded to OpenLIT and can be used to exclude selected libraries.

For OpenAI sync and async embedding calls, the adapter enriches OpenLIT native spans with every returned vector element in canonical traceloop.entity.output. The enrichment does not wrap provider methods or create another span, and it is disabled together with all other payload capture by capture_content=False.

Do not also enable a Respan provider instrumentation for the same client in the same process unless two nested provider spans are intentional. Deactivation only uninstruments OpenLIT instrumentors that this plugin activated; pre-existing OpenLIT instrumentation is preserved.

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_openlit-0.1.0.tar.gz (9.7 kB view details)

Uploaded Source

File details

Details for the file respan_instrumentation_openlit-0.1.0.tar.gz.

File metadata

  • Download URL: respan_instrumentation_openlit-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 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_openlit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3464c9d4890bcfb851d6a4b269aefe92c3be64e71d39edc55bd926decfd61336
MD5 549776538939713ec85c63a921d3cb31
BLAKE2b-256 009ddcac62ebf4ee5edb62760d6c62d0ad861d628964e9f42eb865ba87c57b84

See more details on using hashes here.

Supported by

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