Helios opentelemetry SDK
Project description
Helios OpenTelemetry SDK
This page describes the Helios OpenTelemetry SDK implementation.
Requirements
Unless otherwise noted, all published artifacts support Python 3.6 or higher.
Getting started
Setting the environment
- Make sure all the required packages are installed in the environment
- Set the
HS_ACCESS_TOKEN
env variable with your Helios access token (another option is to provide it within the code when calling to theinitialize
function) - If you wish to disable the instrumentation set the
HS_DISABLED
env var totrue
Manually instrument your code
To fully instrument your code, just import the initialize
function from the SDK and run it in the beginning of your code
Here is an example of instrumenting a flask server:
import flask
from helios import initialize
hs = initialize(service_name='my_service_name')
app = flask.Flask('my_app')
@app.route('/', methods=['GET'])
def home():
return "OK"
app.run()
The Helios SDK will automatically check all the supported packages, and instrument every package that is installed on the environment
In our example, assuming the flask
module is installed in the env, it will be instrumented, together with every other supported module that is installed in the env
Running instrumented test
In case we don't want to manually instrument the code, but want to run instrumented test we can use the hstest
plugin for pytest
:
pytest -p hstest ./tests
This command will run all the tests in ./tests
directory using pytest
, instrumenting all the supported packages that are installed in the environment
Installing
The SDK package is available on the Python Package Index (PyPI). You can install it via pip with the following commands:
pip install helios-opentelemetry-sdk
Testing
- install
nox
:
pip install nox
- run all tests using the command
nox
from the main directory - you can list all available tests by running:
nox --list
- you can run a single test by runnong:
nox --sessions <TEST_NAME>
Releasing
Follow the releasing instructions
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 Distribution
Built Distribution
Hashes for helios-opentelemetry-sdk-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | deb6ad36965401c601ec625c66cd26d32c1aa58fae9521fdab54a373ab230ffb |
|
MD5 | 48cd4bc6c0d0f068e96bf82da0ab00f3 |
|
BLAKE2b-256 | 0fe9a7c5610d58b283777a72466bfa4e6f26525a3d8fdd416ffaf967ebbfa8c9 |
Hashes for helios_opentelemetry_sdk-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e37b8ebf970c4e768c40d99da15ba234213229be0c2351be4e26b82c8fb1aaa |
|
MD5 | 77ca461e2807a0793c81d47a80aa0cca |
|
BLAKE2b-256 | 3849c9d2e15ecacacf692330c7438d33839eeefedaece4cc8783da503879c232 |