Skip to main content

conviva-agent-traces-connector

An OpenTelemetry helper library that propagates selected W3C baggage entries onto your spans, so context like c3.client_id, c3.conv_id, and c3.msg_id flows through your traces automatically.

Using conviva-agent-tracing? The connector is already a dependency of it, and init() installs it. This package is for applications that run their own OpenTelemetry setup.

What it does

  1. Extracts W3C baggage entries whose key matches an allowlist (default: any key starting with c3.) from the active OpenTelemetry context.
  2. Copies those baggage entries as attributes onto every span the process starts, via a custom SpanProcessor.on_start.
  3. Ensures the global propagator includes the W3C Baggage propagator (and trace-context propagator) so incoming baggage: headers are parsed and outgoing HTTP calls re-inject baggage.

Non-goals

This package deliberately does not:

  • Auto-instrument HTTP. It only guarantees the baggage propagator is registered. Your app must install its own OTel HTTP server/client instrumentation (e.g. opentelemetry-instrumentation-requests, opentelemetry-instrumentation-fastapi) for baggage to be extracted from incoming requests and injected into outgoing requests at the transport layer.
  • Redact values. Baggage values are copied verbatim (as strings).
  • Replace an existing TracerProvider. It only attaches a span processor to the provider you already have and merges propagators.

Install

pip install -e .

For development (tests):

pip install -e ".[dev]"

Quickstart

from conviva_agent_traces_connector import install

install()  # attaches to the global TracerProvider

install() is idempotent — calling it multiple times against the same provider attaches the span processor only once and returns the existing processor.

You can also pass an explicit provider and/or config:

from opentelemetry.sdk.trace import TracerProvider
from conviva_agent_traces_connector import Config, install

provider = TracerProvider()
install(provider, Config(attribute_prefix="conviva."))

Configuration

Config is a frozen dataclass with the following fields:

Field Type Default Description
allowlist tuple[str, ...] ("c3.",) A key matches if it equals an entry, or starts with an entry that ends in ..
attribute_prefix str "" Prefix prepended to each copied attribute key (e.g. "conviva." turns c3.client_id into conviva.c3.client_id).
logger logging.Logger | None None Optional logger used for warnings (the processor never raises from on_start).

Matching examples with the default allowlist ("c3.",):

  • c3.client_id → matched (prefix)
  • c3. → matched (prefix)
  • c3client_id → not matched
  • foo → not matched

Public API

from conviva_agent_traces_connector import (
    install,
    BaggageSpanProcessor,
    Config,
    DEFAULT_CONFIG,
    ensure_baggage_propagator,
)

Development

python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest -q

Documentation

README.md What the package does and its API.
INTEGRATION.md Step-by-step integration into an application.
AGENTS.md Guidance for AI coding agents working on or with this package.

Metadata

Release files for conviva-agent-traces-connector 1.2.0

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

Built distribution (wheel)

Table of built distributions (wheels) for conviva-agent-traces-connector 1.2.0
File Interpreter ABI Platform Actions
conviva_agent_traces_connector-1.2.0-py3-none-any.whl Python 3 none any Details for conviva_agent_traces_connector-1.2.0-py3-none-any.whl

Release files / conviva_agent_traces_connector-1.2.0-py3-none-any.whl

Download URL conviva_agent_traces_connector-1.2.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbe12e5b7c9282f7e9c1d30e2856a798dab1f6d0c39e5189d55b2d0ec1cdee4b
BLAKE2b-256 checksum
How to use checksums
748a24650117b223355617e25297daadc804f8078d1e3c27bb82a8fb9bcfa586
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 Nov 25, 2026.

Transparency log

Security for conviva-agent-traces-connector 1.2.0

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for conviva_agent_traces_connector-1.2.0-py3-none-any.whl

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 Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2.0 This release

1 release file Full provenance

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