LightStep

LightStep Documentation

Welcome to the LightStep developer hub. You'll find comprehensive guides and documentation to help you start working with LightStep as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Python Auto-Instrumentation

If your app is written in Python, you can get started quickly with LightStep. Download the Auto-Installer, then configure it to communicate with your LightStep Satellites. When you deploy your app, all supported frameworks, data stores, and libraries will begin sending trace data to LightStep.

These Auto-Installers are forked from Datadog's contribution of their tracers to the OpenTelemetry project. You can find the original Datadog docs here.

For Python Django applications, note that tracing is disabled when your application is launched in DEBUG mode.

Supported Python Versions

Python versions 2.7 and 3.4 and up are supported.

Install the Auto-Installer

Install the Python Auto-Installer, using pip.

pip install ls-trace

Set B3 Headers for Trace Propagation

LightStep recommends using B3 headers for trace propagation as the default, especially on hybrid deployments, as it is the most widely supported header at this time.

from ddtrace import tracer
from ddtrace.propagation.b3 import B3HTTPPropagator
tracer.configure(http_propagator=B3HTTPPropagator)

Configure the Auto-Installer to Send Data to LightStep

To send data from your system to LightStep, you need to configure the Auto-Installer to:

  • Point to your Satellites
  • Send global tags required by LightStep to ingest and display the data to you.

To configure the Auto-Installer:
Configure the Auto-Installer to point to the LightStep Satellites by setting these environment variables. Use the right values, depending on if you are using on-premise, LightStep public, or Developer Mode Satellites.

DD_TRACE_AGENT_URL=https://<Satellite host>:<Satellite port>
DD_TRACE_GLOBAL_TAGS="lightstep.service_name:<service_name>,lightstep.access_token:<access_token>"
DD_TRACE_AGENT_URL=https://ingest.lightstep.com:443
DD_TRACE_GLOBAL_TAGS="lightstep.service_name:<service_name>,lightstep.access_token:<access_token>"
DD_TRACE_AGENT_URL=http://localhost:8360
DD_TRACE_GLOBAL_TAGS="lightstep.service_name:<service_name>,lightstep.access_token:<access_token>"

Where to find the host and port values for on-premise?

This is your pool address, found in your configuration file.

When setting the environment variable DD_TRACE_GLOBAL_TAGS, the following variables must be included:

  • service_name:
    The name of the service from which spans originate.
    This tag allows LightStep to accurately report on your services, with features such as the Service diagram and the Service Directory
  • access_token:
    The access token for the project the tracers report to.
    LightStep Satellites need this token to accept and store span data from the tracer. Reports from clients with invalid or deactivated access tokens will be rejected on ingress.

Run Your App

To include the Auto-Installer's auto-instrumentation, prefix your Python entry-point command with ls-trace-run.
For example, if your application is started with python app.py then:
$ ls-trace-run python app.py

What's Auto-Instrumented

Following are the supported frameworks, data stores, and libraries that are auto-instrumented when you run your app.

Frameworks

FrameworkSupported Version
aiohttp>= 1.2
Bottle>= 0.11
Django>= 1.8
djangorestframework>= 3.4
Falcon>= 1.0
Flask>= 0.10
Molten>= 0.7.0
Pylons>= 0.9.6
Pyramid>= 1.7
Tornado>= 4.0

Data Stores

DatastoreSupported Version
Cassandra>= 3.5
Elasticsearch>= 1.6
Flask Cache>= 0.12
Memcached pylibmc>= 1.4
Memcached pymemcache>= 1.3
MongoDB Mongoengine>= 0.11
MongoDB Pymongo>= 3.0
MySQL MySQL-python>= 1.2.3
MySQL mysqlclient>= 1.3
MySQL mysql-connector>= 2.1
Postgres aiopg>= 0.12.0
Postgres psycopg>= 2.4
Redis>= 2.6
Redis redis-py-cluster>= 1.3.5
SQLAlchemy>= 1.0
SQLite3Fully Supported
Vertica>= 0.6

Libraries

LibrarySupported Version
asyncioFully Supported
gevent>= 1.0
aiobotocore>= 0.2.3
Boto2>= 2.29.0
Botocore>= 1.4.51
Celery>= 4.0.2
FuturesFully Supported
Grpc>= 1.8.0
httplibFully Supported
Jinja2>= 2.7
Kombu>= 4.0
Mako>= 0.1.0
Requests>= 2.08

Use Datadog Tracers with LightStep Tracers

If you're using a mix of Datadog and LightStep you must use B3 header propagation.

Updated about a month ago

Python Auto-Instrumentation


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.