Skip to main content

Splunk Distribution of OpenTelemetry Python

PyPI - Version PyPI - Python Version

The Splunk Distribution of OpenTelemetry Python extends OpenTelemetry Python to automatically instrument Python applications and export traces, metrics, and logs to Splunk Observability Cloud. It patches supported libraries at runtime with OpenTelemetry-compatible instrumentation and provides Splunk-specific configuration defaults.

This distribution comes with the following defaults:

Requirements

The Splunk Distribution of OpenTelemetry Python requires Python 3.10 or later. Supported libraries are listed here.

Get started

For complete instructions on how to get started with the Splunk Distribution of OpenTelemetry Python, see Instrument a Python application for Splunk Observability Cloud in the official documentation.

For the standard OpenTelemetry setup, install the Splunk Distribution of OpenTelemetry Python in your application environment. The distribution configures OTLP exporters for traces, metrics, and logs, includes system metrics instrumentation, and enables Python logging instrumentation.

pip install splunk-opentelemetry

Install instrumentation packages for the libraries your application uses:

opentelemetry-bootstrap -a install

Then run your application with opentelemetry-instrument:

OTEL_SERVICE_NAME=my-python-service opentelemetry-instrument python app.py

By default, OTLP exporters send telemetry to a locally running Splunk OpenTelemetry Collector at http://localhost:4317. To send telemetry directly to Splunk Observability Cloud instead, set SPLUNK_REALM and SPLUNK_ACCESS_TOKEN before starting your application. SPLUNK_REALM configures direct ingest endpoints for traces and metrics.

Experimental PostgreSQL trace correlation

Set SPLUNK_DB_TRACE_CONTEXT_PROPAGATION_ENABLED=true to link PostgreSQL query samples to APM traces and database client spans. This feature is disabled by default. See PostgreSQL trace correlation for setup, supported drivers, and limitations.

Declarative configuration

The distribution includes experimental support for the OpenTelemetry declarative configuration file format. Set OTEL_CONFIG_FILE to the path of the YAML configuration file when you start the instrumented application:

OTEL_CONFIG_FILE=/path/to/config.yaml opentelemetry-instrument python app.py

See the basic declarative configuration example, which exports traces, metrics, and logs to a local Collector at http://localhost:4317.

This support configures upstream OpenTelemetry SDK components. Configure exporters, including their endpoints and authentication headers, in the YAML file.

The GDI distribution.splunk configuration block supports continuous CPU profiling, call graph profiling, and instrumentations.http.trace_response_header_enabled, which defaults to true. To disable the trace response header, add this block to the YAML file:

distribution:
  splunk:
    instrumentations:
      http:
        trace_response_header_enabled: false

To enable profiling, see the YAML examples for continuous profiling and call graph profiling. When OTEL_CONFIG_FILE is set, the distribution does not enable PostgreSQL trace correlation.

OpAMP does not report the declarative file as effective configuration and cannot manage it remotely yet.

Profiling

The Splunk Distribution of OpenTelemetry Python supports continuous profiling and call graph profiling. Both modes export profiling data through OpenTelemetry logs for correlation with traces in Splunk APM. See Profiling for configuration and limitations.

Optional: Cisco SecureApp

To also install the Cisco SecureApp OpenTelemetry extension, specify the secureapp extra:

pip install "splunk-opentelemetry[secureapp]"

This extra installs the SecureApp Python agent, which reports runtime Python package dependencies through OpenTelemetry logs.

SecureApp dependency logs use the secureapp instrumentation scope. Collector deployments must route those logs to the SecureApp event ingest endpoint (/v3/event) and add the SecureApp instrumentation header on the outbound exporter. See docs/secureapp.md for setup details and docs/examples/secureapp-collector-config.yaml for a collector example.

Fleet management with OpAMP

The Splunk Distribution of OpenTelemetry Python provides OpAMP support. When enabled, the OpAMP client connects to the configured endpoint and reports the Python agent's status and settings. Agents connected to Splunk Observability Cloud appear on the Fleet Management page.

Set SPLUNK_OPAMP_ENABLED=true to enable OpAMP. The default OpAMP endpoint is a local Splunk OpenTelemetry Collector. See OpAMP for setup, configuration, and limits.

License

The Splunk Distribution of OpenTelemetry Python is a distribution of OpenTelemetry Python. It is licensed under the terms of the Apache Software License version 2.0. See the license file for more details.

Metadata

Release files for splunk-opentelemetry 2.14.0

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

Source distribution (sdist)

Source distribution for splunk-opentelemetry 2.14.0
File Size Uploaded Provenance Actions
splunk_opentelemetry-2.14.0.tar.gz 111.8 kB Without provenance Details for splunk_opentelemetry-2.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for splunk-opentelemetry 2.14.0
File Interpreter ABI Platform Actions
splunk_opentelemetry-2.14.0-py3-none-any.whl Python 3 none any Details for splunk_opentelemetry-2.14.0-py3-none-any.whl

Total release size: 148.7 kB

Release files / splunk_opentelemetry-2.14.0.tar.gz

Download URL splunk_opentelemetry-2.14.0.tar.gz
Size 111.8 kB
Tags Source
SHA-256 checksum
How to use checksums
97616377923d9883250cd36de818cd619d3634b9e6791b1cfae7c326737a26c5
BLAKE2b-256 checksum
How to use checksums
986ea245cd531b6f4cfd1ce874f4fbd0f5a23eb46e8db60dea98e352a06518ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.11.18"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.7 9 Jun 2026","python":"3.11.18","system":{"name":"Linux","release":"6.8.0-1066-aws"}} HTTPX2/2.16.2

Release files / splunk_opentelemetry-2.14.0-py3-none-any.whl

Download URL splunk_opentelemetry-2.14.0-py3-none-any.whl
Size 36.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aec86dd836cde81c0fb83157f5b112121737b6260bb7cc04dfe32d6d1547346d
BLAKE2b-256 checksum
How to use checksums
802a079dd14d5778d836cb759374ae82b3bf3bbec9c68e0d8823f9c05935eb16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.11.18"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.7 9 Jun 2026","python":"3.11.18","system":{"name":"Linux","release":"6.8.0-1066-aws"}} HTTPX2/2.16.2

Security for splunk-opentelemetry 2.14.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

2.14.0 This release

2 release files No 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