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.1.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.1.1-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sonar_tracing-0.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 090d669679949d01c642063dfb40bfbe8eedfd3e6af6323fc66b00b3ff2a280e
MD5 52ecc62332d8c07dc8a6c6f1774afb1c
BLAKE2b-256 861f9e9a75f0f195c4f8ec4d573e61e114c357aa8fec221950f6d65e3e341d17

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: sonar_tracing-0.1.1-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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c764df2352e412a5ecf8a90384fbc1b41fa12d62bef6cdca4e51d5a5a46ac720
MD5 6a462204b6a5658ffdb91c84cd182030
BLAKE2b-256 101fd0c022054f3a251c86628ac8d41099faee1c227b2b1050d76c2a26eb8d21

See more details on using hashes here.

Provenance

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

0.2.0

2 files

This release

0.1.1 This release

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