otelme - pronounced "Oh, tell me"
A low-friction OpenTelemetry wrapper for Python apps. It comes with sugar over basic spanning and the tell magic receiver.
Usage
Use context managers or decorators to automatically create scoped spans:
with telme.tell('update_user_record'):
telme.tell('a') | 'b'
...
@telme.tell
def myfunc():
...
@telme.tell('different_name')
def myfunc():
...
Save the user friend count before adding to it and saving it to a variable
new_count = telme.tell('friends') @ len(user.friends) + 1
Save the result of count + 1 as the attribute 'newcount' on the current span
telme.tell('newcount') + count
new_count = telme.tell('newcount') + 1
Use a splat (*) operator to add a whole dict a JSON attribute on the current trace
telme.tell('explosion') * {'bang': 'loud', 'flame': 'big'}
# adds span attr: {'explosion': '{"bang": "loud", "flame": "big"}'
Use double-splat (**) operator to hoist a dict by its keys on the current trace
telme.tell('explosion') ** {'bang': 'loud', 'flame': 'big'}
# adds span attrs: {'explosion.bang': 'loud', 'explosion.flame': 'big'}
Use notify with the splat (*) operator to add a dict as an event on the current trace
telme.notify('explosion') ** {'bang': 'loud', 'flame': 'big'}
# adds new event `explosion` with attrs: {'bang': 'loud', 'flame': 'big'}
Inspired by pipe, q, and the rollup_field support in Honeycomb's beeline.
Contributing
All help is welcome, especially help understanding how otelme is used and what other use cases we can help with. Not all pull requests will be accepted, before opening a PR with a feature please open an issue to discuss it to avoid doing work that can't be upstreamed.
License
otelme is available under the MIT license, see LICENSE for details.
Metadata
Release files for otelme 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| otelme-0.0.4.tar.gz | 11.9 kB | Without provenance | Details for otelme-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| otelme-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for otelme-0.0.4-py3-none-any.whl |
Total release size: 17.3 kB
Release files / otelme-0.0.4.tar.gz
| Download URL | otelme-0.0.4.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f5e372d5cce67d563a71e5223f58a0df43fd835e7a9a9f9d01c64163b12d4f6
|
|
BLAKE2b-256 checksum How to use checksums |
220e1c4bce565d331390ed1520e4831af2157894f812ff5321389c258be497fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / otelme-0.0.4-py3-none-any.whl
| Download URL | otelme-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d58c7169d7ae8516337d28290b9b7d1b32e0fcc9cc77443bac208116d172ea55
|
|
BLAKE2b-256 checksum How to use checksums |
303eb06abea81e507647e09cff64e624c3b5b6519f9525d9fdbcecb66fd8e3b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Security for otelme 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.