Lumigo OpenTelemetry distribution for Python
Project description
lumigo_opentelemetry :stars:
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 underSettings -> Tracing -> Manual tracing
.LUMIGO_DEBUG=TRUE
: Enables debug loggingLUMIGO_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:
- Clone this repository, and open a CLI in the cloned directory
- Create a virtual environment for the project
virtualenv venv -p python3
- Activate the virtualenv:
. venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Navigate to the source directory:
cd src
and - Run the setup script:
python setup.py develop
. - 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
Built Distribution
Hashes for lumigo_opentelemetry-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19dd27235b7a9d7c069a213b49744b78d16aa2445c3ca35bd4221ab52678cc27 |
|
MD5 | a75f15fd0035c7eeeabd16b0b6dd9e02 |
|
BLAKE2b-256 | 1c38b26567c8db2c9a8f6ccb7514822374526b8ef2b712cafdad3928653446a4 |