Skip to main content

The Splunk distribution of OpenTelemetry Python Instrumentation provides a Python agent that automatically instruments your Python application to capture and report distributed traces to SignalFx APM.

Project description


Get Started   •   Get Involved   •   Migrating from SignalFx Python Tracing

OpenTelemetry Python Version GitHub release (latest SemVer) PyPI - Python Version Splunk GDI specification Codecov Build Status

Examples   •   Security   •   Supported Libraries   •   Troubleshooting

Splunk Distribution of OpenTelemetry Python

The Splunk distribution of OpenTelemetry Python provides multiple installable packages that automatically instrument your Python application to capture and report distributed traces to Splunk APM. Instrumentation works by patching supported libraries at runtime with an OpenTelemetry-compatible tracer to capture and export trace spans.

This distribution comes with the following defaults:

If you're currently using the SignalFx Tracing Library for Python and want to migrate to the Splunk Distribution of OpenTelemetry Python, see Migrate from the SignalFx Tracing Library for Python.


Requirements

This Splunk Distribution of OpenTelemetry requires Python 3.6 or later.

Get started

To get started, install the splunk-opentelemetry[all] package, run the bootstrap script and wrap your run command with splunk-py-trace.

For example, if the runtime parameters were:

python main.py --port=8000

Then the runtime parameters should be updated to:

$ pip install splunk-opentelemetry[all]
$ splunk-py-trace-bootstrap
$ OTEL_SERVICE_NAME=my-python-app \
    splunk-py-trace python main.py --port=8000

To see the Python instrumentation in action with sample applications, see our examples.

Basic configuration

The service name resource attribute is the only configuration option that needs to be specified. You can set it by adding a service.name attribute as shown in the example above.

A few other configuration options that may need to be changed or set are:

  • Trace propagation format if not sending to other applications using W3C trace-context. For example, if other applications are instrumented with signalfx-*-tracing instrumentation. See the trace propagation configuration documentation for more information.
  • Endpoint if not sending to a locally running Splunk OpenTelemetry Connector with default configuration. For example, if the SignalFx Smart Agent is used. See the exporters configuration documentation for more information.
  • Environment resource attribute deployment.environment to specify what environment the span originated from. For example:
    OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production
    
  • Service version resource attribute service.version to specify the version of your instrumented application. For example:
    OTEL_RESOURCE_ATTRIBUTES=service.version=1.2.3
    

The deployment.environment and service.version resource attributes are not strictly required, but recommended to be set if they are available.

The OTEL_RESOURCE_ATTRIBUTES syntax is described in detail in the trace configuration section.

Supported Python Versions

The instrumentation works with Python verion 3.6 or higher. Supported libraries are listed here.

Advanced Configuration

For the majority of users, the Getting Started section is all you need. Advanced configuration documentation can be found here. In addition, special cases for instrumentation are documented here.

Manually instrument an application

Documentation on how to manually instrument a Python application is available here.

To extend the instrumentation with the OpenTelemetry Instrumentation for Python, you have to use a compatible API version.

The Splunk Distribution of OpenTelemetry Python version 1.4.1 is compatible with:

  • OpenTelemetry API version 1.9.1
  • OpenTelemetry SDK version 1.9.1
  • OpenTelemetry Instrumentation for Python version 0.28b1

Correlating traces with logs

The Splunk Distribution of OpenTelemetry Python provides a way to correlate traces with logs. See Connect Python trace data with logs.

License and versioning

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

ℹ️  SignalFx was acquired by Splunk in October 2019. See Splunk SignalFx for more information.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

splunk-opentelemetry-1.4.1.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

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

splunk_opentelemetry-1.4.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file splunk-opentelemetry-1.4.1.tar.gz.

File metadata

  • Download URL: splunk-opentelemetry-1.4.1.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.10 Linux/5.4.0-1061-aws

File hashes

Hashes for splunk-opentelemetry-1.4.1.tar.gz
Algorithm Hash digest
SHA256 ba1a0e7e16ed6bdef3440ae2ccd21dc1e13de0987ac1591c94236e1a86b8be21
MD5 be5ed06b6dd98f1d406d5164db13a714
BLAKE2b-256 943507ef1d16a2ac422afb749a95475862157bc9c108f65ab95ff7726b32abe2

See more details on using hashes here.

File details

Details for the file splunk_opentelemetry-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: splunk_opentelemetry-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.10 Linux/5.4.0-1061-aws

File hashes

Hashes for splunk_opentelemetry-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9506eed3188a21719239bd854db1399e62ba2566b73d02dabaf83643302e5502
MD5 7b00d28b7b04141c1791f9bb71d7e799
BLAKE2b-256 6d4b8fead04a090c3e700d9d5babac0f92b7a02ce354b9fd513b0f4ddfdfc610

See more details on using hashes here.

Supported by

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