Docs » Supported integrations in Splunk Observability Cloud » Instrument back-end applications to send spans to Splunk APM » Instrument Python applications for Splunk Observability Cloud » Migrate from the SignalFx Tracing Library for Python

Migrate from the SignalFx Tracing Library for Python πŸ”—

The SignalFx Tracing Library for Python is deprecated and will reach End of Support on December 17th, 2022. Replace it with the agent from the Splunk Distribution of OpenTelemetry Python.

The agent of the Splunk Distribution of OpenTelemetry Python is based on the OpenTelemetry Instrumentation for Python, an open-source project that uses the OpenTelemetry API.

Read the following instructions to learn how to migrate to the Splunk Python OTel agent.

Compatibility and requirements πŸ”—

The Splunk Distribution of OpenTelemetry Python requires Python 3.7 and higher. See Python agent compatibility and requirements.

Migrate to the Splunk Distribution of OpenTelemetry Python πŸ”—

To migrate from the SignalFx Tracing Library for Python to the Splunk Distribution of OpenTelemetry Python, follow these steps:

  1. Remove the tracing library packages. See Remove the SignalFx Tracing Library for Python.

  2. Deploy the Splunk Distribution of OpenTelemetry Python. See Deploy the Splunk Python agent.

  3. Migrate your existing configuration. See Migrate settings for the Splunk Python OTel agent.

  4. Start your Python service or application. See Start you Python application after completing the migration.

Note

Semantic conventions for span names and attributes change when you migrate. For more information, see Migrate from SignalFx Smart Agent to the Splunk Distribution of OpenTelemetry Collector.

Remove the SignalFx Tracing Library for Python πŸ”—

Follow these steps to remove the tracing library and its dependencies:

  1. Uninstall signalfx-tracing:

    pip uninstall signalfx-tracing
    
  2. Remove signalfx-tracing from your requirements.txt or pyproject.toml file.

  3. If the package manager didn’t remove every dependency for signalfx-tracing, remove them manually:

    pip uninstall opentracing
    pip uninstall jaeger-client
    
  4. Remove every instrumentation package installed by the sfx-py-trace-bootstrap command.

  5. Remove any additional OpenTracing instrumentation packages you installed.

Additional steps for Django applications πŸ”—

The Splunk Distribution of OpenTelemetry Python doesn’t require you to add anything to INSTALLED_APPS.

Follow these steps to update your Django configuration:

  1. Remove signalfx_tracing from INSTALLED_APPS in settings.py.

  2. Set the DJANGO_SETTINGS_MODULE environment variable to the same value as in manage.py or wsgi.py.

Deploy the Splunk Python agent πŸ”—

To install the Splunk Distribution of OpenTelemetry Python, see Instrument your Python application for Splunk Observability Cloud.

Migrate settings for the Splunk Python OTel agent πŸ”—

To migrate settings from the SignalFx tracing library to the Splunk Distribution of OpenTelemetry Python, rename the following environment variables:

SignalFx environment variable

OpenTelemetry environment variable

SIGNALFX_ACCESS_TOKEN

SPLUNK_ACCESS_TOKEN

SIGNALFX_SERVICE_NAME

OTEL_SERVICE_NAME

SIGNALFX_ENDPOINT_URL

OTEL_EXPORTER_JAEGER_ENDPOINT or OTEL_EXPORTER_OTLP_ENDPOINT

SIGNALFX_RECORDED_VALUE_MAX_LENGTH

SPLUNK_MAX_ATTR_LENGTH

For more information about Splunk Python OTel settings, see Configure the Python agent for Splunk Observability Cloud.

Start you Python application after completing the migration πŸ”—

Run your python application or service using splunk-py-trace. For example, if you run your service using python main.py, you can automatically instrument by running it with splunk-py-trace python main.py. For more information, see Instrument your Python application for Splunk Observability Cloud.

Log injection changes πŸ”—

To inject tracing metadata into log statements, see Connect Python trace data with logs for Splunk Observability Cloud.

This page was last updated on Apr 24, 2023.