Skip to main content

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


Download files

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

Source Distribution

opentelemetry_wrapper-0.0.5.tar.gz (22.1 kB view hashes)

Uploaded Source

Built Distribution

opentelemetry_wrapper-0.0.5-py3-none-any.whl (21.1 kB view hashes)

Uploaded Python 3

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