a wrapper around `opentelemetry` and `opentelemetry-instrumentation-*` to make life a bit easier
Project description
opentelemetry_wrapper
a wrapper around opentelemetry
and opentelemetry-instrumentation-*
to make life a bit easier
what this does (or is supposed to do)
- Make instrumentation (more) idempotent
- Make re-instrumentation of logging actually work with different format strings
- Make
logging
print as a one-line JSON dict by default - Provide support for decorating functions and classes
- Provide support for instrumentation of dataclasses
- Global instrumentation needs to be run before any dataclasses are initialized
- Otherwise, use the decorator on each class as usual (it's idempotent anyway)
- Add global instrumentation of FastAPI
- sometimes works even after apps are created for some reason, likely due to how Uvicorn runs in a new process
- but somehow sometimes doesn't work in prod, for equally unknown reasons
- probably best to instrument each app instance
- logs some http headers received by fastapi as span attributes
usage
todo: write stuff here
read the original docs
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
Close
Hashes for opentelemetry_wrapper-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f7a7dd8713228fdfcb8e8cf762e8dc807bd9235e77843704cc380108a1cfcd8 |
|
MD5 | 1fe1fd961879cac5534fba90597ddd1f |
|
BLAKE2b-256 | 91bbca33a6d06c6520baeac78da11a864da442e4a43d445872e47b6fbafd122d |
Close
Hashes for opentelemetry_wrapper-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b84ec1ed3513a2b72fab45e503a6d688ee247fdcc2eb8b4cce49e8531f66c7b |
|
MD5 | c1ee490264b0ccd7fdf376ff139a7cb7 |
|
BLAKE2b-256 | 8e69c027aca0accf646dad27b5794aaa646e62305a3d3d42a32eb8a1de36bde8 |