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.2.0.tar.gz (31.7 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.2.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sonar_tracing-0.2.0.tar.gz
  • Upload date:
  • Size: 31.7 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.2.0.tar.gz
Algorithm Hash digest
SHA256 0e298cf97c0ff559e0c87e7db4ae2aa862a022ea26e201537c6dae71c252518d
MD5 46665530099d72bfe1f2b4a726d59f84
BLAKE2b-256 d782af828dceafa83ef4d50e247380166c1d82e8bd38c26402c3da222c49be9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonar_tracing-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: sonar_tracing-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66e9dee0c175fc096737348786a9728cc90da070150487e5617b6c14e519770e
MD5 45e5b6b86a36e3411b9ec2815da444bd
BLAKE2b-256 e492e9a1828da63025ea47e8bef98c1332b907621db8b46b48cfdf9271fee109

See more details on using hashes here.

Provenance

The following attestation bundles were made for sonar_tracing-0.2.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.

Release history Release notifications | RSS feed

0.3.1

2 files

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

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