Skip to main content

OpenTelemetry custom distro to connect to SolarWinds

Project description

Python solarwinds-apm

Minimum Python Version Release License

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.9 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 "psutil>=5.0"
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 "psutil>=5.0"
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-5.2.1.tar.gz (70.0 kB view details)

Uploaded Source

Built Distribution

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

solarwinds_apm-5.2.1-py3-none-any.whl (79.4 kB view details)

Uploaded Python 3

File details

Details for the file solarwinds_apm-5.2.1.tar.gz.

File metadata

  • Download URL: solarwinds_apm-5.2.1.tar.gz
  • Upload date:
  • Size: 70.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for solarwinds_apm-5.2.1.tar.gz
Algorithm Hash digest
SHA256 892b56e5f2616f8c96f72be881a5a3d5d4f3e711b831de5d8dea6afc7ff19d94
MD5 dd8f7f6276668ea956812b7a4cf2715b
BLAKE2b-256 c4f7ddcf67a695217da49424ea8d406e61a0b47401e96ad7e3ebd3148d09a2f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for solarwinds_apm-5.2.1.tar.gz:

Publisher: build_publish_pypi_and_draft_release.yaml on solarwinds/apm-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file solarwinds_apm-5.2.1-py3-none-any.whl.

File metadata

  • Download URL: solarwinds_apm-5.2.1-py3-none-any.whl
  • Upload date:
  • Size: 79.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for solarwinds_apm-5.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 104e3e6620215433c7a6705282c8252f097081885f09ff3763a995b5619d1fd2
MD5 50e84fd53de465edf9a308149b2abdeb
BLAKE2b-256 be3d7839a45c53dc746a968cb852b2d95c2b6b4ae6e727a4914d9b45807100cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for solarwinds_apm-5.2.1-py3-none-any.whl:

Publisher: build_publish_pypi_and_draft_release.yaml on solarwinds/apm-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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