Skip to main content

OpenTelemetry custom distro to connect to SolarWinds

Project description

PyPI version PyPI - Python Version License

Python solarwinds-apm

An OpenTelemetry Python distribution for SolarWinds Observability. Provides automatic configuration, instrumentation, and APM data export for Python applications.


Requirements

All published artifacts support Python 3.7 or higher. A full list of system requirements is available at SolarWinds Observability System Requirements.

See CONTRIBUTING.md for how to build for development.

Getting Started

SolarWinds APM captures OpenTelemetry distributed traces and metrics from your application and sends them to SolarWinds Observability for analysis and visualization.

To install solarwinds-apm and all relevant Opentelemetry Python instrumentation libraries:

pip install solarwinds-apm
opentelemetry-bootstrap --action=install

solarwinds-apm already includes OpenTelemetry and therefore doesn't need to be installed separately. Python agent installation should be done after installation of all other service dependencies. This is so opentelemetry-bootstrap detects those packages and installs their corresponding instrumentation libraries. For example:

pip install -r requirements.txt           # installs all other dependencies
pip install solarwinds-apm
opentelemetry-bootstrap --action=install

Set the service key and ingestion endpoint. An easy way to do this is via environment variables available to your application process. An example:

export SW_APM_SERVICE_KEY=<set-service-key-here>
export SW_APM_COLLECTOR=<set-collector-here>

Run your application with the prefix opentelemetry-instrument to wrap all common Python frameworks and start exporting OpenTelemetry traces and metrics:

opentelemetry-instrument <command_to_run_your_service>

You can also add custom span generation to your code by using the OpenTelemetry SDK. For example:

from opentelemetry import trace
tracer = trace.get_tracer(__name__)

with tracer.start_as_current_span("my_custom_span") as custom_span:
   custom_span.set_attribute("my_custom_attribute", "foo_value")
   print("Here is my custom OpenTelemetry span")

Documentation

OpenTelemetry Python documentation is available at the OpenTelemetry-Python API Reference.

Online documentation for SolarWinds APM Python features, configuration, and more is available at SolarWinds Observability.

Contributing

OpenTelemetry Python would not be possible without collaborations and efforts from many contributors. Our common goals as a community are to improve end user/developer experiences and empower them.

For more information about contributing to Python solarwinds-apm, see CONTRIBUTING.md. Thank you to everyone who has contributed:

Project details


Download files

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

Source Distribution

solarwinds_apm-1.6.0.tar.gz (29.0 MB view hashes)

Uploaded Source

Built Distributions

solarwinds_apm-1.6.0-pp310-pypy310_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-pp310-pypy310_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-pp39-pypy39_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-pp39-pypy39_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-pp38-pypy38_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-pp38-pypy38_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-pp37-pypy37_pp73-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.8 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-pp37-pypy37_pp73-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.7 MB view hashes)

Uploaded PyPy manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (7.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (7.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (7.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (7.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (7.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

solarwinds_apm-1.6.0-cp37-cp37m-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.27+ x86-64 manylinux: glibc 2.28+ x86-64

solarwinds_apm-1.6.0-cp37-cp37m-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (7.1 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.27+ ARM64 manylinux: glibc 2.28+ ARM64

Supported by

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