Skip to main content

otelme pronounced "Oh, tell me"

Project description

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 explode a dict into an event on the current trace

telme.tell('explosion') * {'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.

Project details


Download files

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

Source Distribution

otelme-0.0.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

otelme-0.0.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file otelme-0.0.3.tar.gz.

File metadata

  • Download URL: otelme-0.0.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for otelme-0.0.3.tar.gz
Algorithm Hash digest
SHA256 87a85ab3ab0589dec55816a92f1be23207fc3fb23aa57218ae6fd6ee52b265ff
MD5 85db01530510522becfee4f2f0f26879
BLAKE2b-256 9e3781d4d3d7c5803fe56a5dc2ba5f604abdbc420ca08b67e89c92bab9b2c88e

See more details on using hashes here.

File details

Details for the file otelme-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: otelme-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for otelme-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b92fb832bc96a614cd26e0a87c1f91169fe92d2839d89b92f2292314f6da99f
MD5 b82c15748fcfe509d33fa0649da77299
BLAKE2b-256 202b0f15d9ba446f103c0742546c7867a10a6b35d5908a8ec53673ad15e2e4f5

See more details on using hashes here.

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