Skip to main content

Lumigo OpenTelemetry distribution for Python

Project description

lumigo_opentelemetry :stars:

CircleCI Version codecov

This is lumigo_opentelemetry package, Lumigo's OpenTelemetry distribution for Python.

Supported Python Runtimes: 3.6, 3.7, 3.8, 3.9, 3.10

Usage

The lumigo_opentelemetry package must be a dependency of your application. In most cases, you will add lumigo_opentelemetry as a line in requirements.txt:

lumigo_opentelemetry

Then, import lumigo_opentelemetry at the beginning of your main file:

import lumigo_opentelemetry

Finally, set the LUMIGO_TRACER_TOKEN environment variable on your application with the token you will find in Lumigo under Settings -> Tracing -> Manual tracing.

Configuration

The lumigo_opentelemetry offers several different configuration options. Pass modify the environment variables:

  • LUMIGO_TRACER_TOKEN: Required configuration to send data to Lumigo; you will find the right value in Lumigo under Settings -> Tracing -> Manual tracing.
  • LUMIGO_DEBUG=TRUE: Enables debug logging
  • LUMIGO_DEBUG_SPANDUMP: path to a local file where to write a local copy of the spans that will be sent to Lumigo; this option handy for local testing but should not be used in production unless you are instructed to do so by Lumigo support.
  • LUMIGO_SECRET_MASKING_REGEX=["regex1", "regex2"]: Prevents Lumigo from sending keys that match the supplied regular expressions. All regular expressions are case-insensitive. By default, Lumigo applies the following regular expressions: [".*pass.*", ".*key.*", ".*secret.*", ".*credential.*", ".*passphrase.*"].

Contributing

Contributions to this project are welcome from all! Below are a couple pointers on how to prepare your machine, as well as some information on testing.

Preparing your machine

Getting your machine ready to develop against the package is a straightforward process:

  1. Clone this repository, and open a CLI in the cloned directory
  2. Create a virtual environment for the project virtualenv venv -p python3
  3. Activate the virtualenv: . venv/bin/activate
  4. Install dependencies: pip install -r requirements.txt
  5. Navigate to the source directory: cd src and
  6. Run the setup script: python setup.py develop.
  7. Run pre-commit install in your repository to install pre-commit hooks

Note: If you are using pycharm, ensure that you set it to use the virtualenv virtual environment manager. This is available in the menu under PyCharm -> Preferences -> Project -> Interpreter

Running the test suite

We've provided an easy way to run the unit test suite:

  • Run ./scripts/checks.sh in the root folder.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

lumigo_opentelemetry-0.1.3-py3-none-any.whl (30.8 kB view hashes)

Uploaded Python 3

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