Skip to main content

sonar-tracing

One-line OpenTelemetry tracing for AI agents, across frameworks.

import sonar_tracing as tracing

tracing.init(service_name="support-agent", framework="strands")

with tracing.identity(tenant_id="acme", session_id=session_id):
    result = agent(prompt)

That is the whole integration. No exporter wiring, no TracerProvider, no OTLP setup — init() builds the production processor/exporter chain for you and identity() stamps tenant/session context onto every span in scope.

Install

pip install sonar-tracing

Framework support ships as a separate package. For AWS Strands, also install the adapter — it registers itself, so there is nothing to import:

pip install sonar-tracing sonar-tracing-strands

What it does

  • init() — stands up a TracerProvider wired to an OTLP HTTP exporter, with redaction and identity-stamping built into the pipeline.
  • identity() — a context manager that attaches tenant/session attributes to spans created within it.
  • Framework support is a plugin, not a branch. Adapters are discovered from the sonar_tracing.adapters entry point group, so a new framework ships as a new package — core never changes.

Requirements

  • Python 3.11+
  • An OTLP-compatible collector endpoint

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sonar_tracing-0.1.0.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

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

sonar_tracing-0.1.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sonar_tracing-0.1.0.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sonar_tracing-0.1.0.tar.gz
Algorithm Hash digest
SHA256 37ef82307b2eaeed1d0af7f02333d0eb663c9c6662ffcc3bd05d7c9936435f75
MD5 bd7c62d1e450807cf7b09cc7b4f77f06
BLAKE2b-256 58c3a2b76dd214eafb8016b2f12e88cf761ec9041a08ade91e00c25b93774294

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonar_tracing-0.1.0.tar.gz:

Publisher: publish.yml on deep-dive-mexico/sonar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: sonar_tracing-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sonar_tracing-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 785c9c40b9d5e0ed78b88c4001a2fd23704322c91c77ebd198aeadf6041e17e3
MD5 12d8fe091afbb028cb8d83274c2582bf
BLAKE2b-256 2d961922eeb0b7431dfa09250123d63ebb63d279d64ccd3aea0b0e0587d575a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonar_tracing-0.1.0-py3-none-any.whl:

Publisher: publish.yml on deep-dive-mexico/sonar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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