Documentation forSolarWinds Observability

Add a Python service

The Python Library is a custom distro based on OpenTelemetry Python instrumentation, providing automatic tracing and metrics for Python-based applications. In addition to offering full compatibility with OpenTelemetry, the Python Library adds extra features. For new features, fixed issues, and updated components, see the Python Library release notes.

Get started

Before you start

Verify the following to ensure the library can collect and transmit data:

  • The platform where your APM library will be installed is supported.

  • Your application components are supported by the library.

  • Your firewall configuration permits TCP/HTTPS/TLS outbound connections to apm.collector.xx-yy.cloud.solarwinds.com (where xx-yy is determined by the URL you use to access SolarWinds Observability, described in Data centers and endpoint URIs) using port 443. See Firewall or access control requirements.

    If your firewall or access control requirements do not allow such connections, configure the library to send data through a proxy.

Remove other APM libraries from your Python installation before using the Python Library.

To enable instrumentation for a Python application and send the data to SolarWinds Observability:

  1. In SolarWinds Observability, click Add Data at the top.

  2. In the Add Data dialog, click Services.

  3. Type a Name for your service and select the Python language.

  4. Create or select an API Ingestion token to use when sending your collected entity type data by doing either of the following:

    • Select Generate New Token and enter an Ingestion Token Name, and then click Next.
    • Select Use Existing Token and select an ingestion token from the list, and then click Next.
  5. Download, install, and enable the Python Library on the host system and configure the Service key and correct ingestion endpoint during installation. Use the Service key shown in the Add Data dialog.

  6. Load the Python Library into your application and start reporting data to the SolarWinds APM collector. This can be done by running your application with the opentelemetry-instrument command.

  7. Wait for the Python Library to successfully connect to the SolarWinds APM collector and for the Waiting for Connection button in SolarWinds Observability to change to OK.

  8. Click OK to finish setting up the service.

    To view data collected for the newly configured entity in the Entity Explorer, click the name of the entity type in the confirmation dialog in the lower-left corner. It may take a few seconds for data to appear for the newly created entity. See Entity Explorer for details.

    For transaction and trace data to appear in the Entity Explorer and Traces Explorer, your service must be running and in use.

To tailor the installed library to your monitoring needs, see Configure the Python Library.

Custom instrumentation

Custom instrumentation can be used to get extra application-specific visibility in SolarWinds Observability, adding both custom spans for distributed tracing and custom timers or counters for metric reporting and alerting. See Python Library instrumentation SDK.