Skip to main content

OpenTelemetry utilities by Vaxila

Project description

OpenTelemetry utilities for Python by Vaxila

PyPI version

This repository contains a set of utilities for OpenTelemetry for Python.

Installation

pip install vaxila-opentelemetry-util

Usage

Add local variables to attributes of exception's event

from vaxila.opentelemetry.util import enable_exc_local_variables_recording

enable_exc_local_variables_recording()

When exception is raised, OpenTelemetry automatically creates an event for exception.
enable_exc_local_variables_recording() adds local variables to the event's attributes automatically by decorating Span.record_exception().
This helps you find the situation where exception happened.

You can see example here.

:warning: When using pre-fork server like Gunicorn, you should call enable_exc_local_variables_recording() before fork to not run same thing multiple times.

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

vaxila_opentelemetry_util-0.0.1.tar.gz (10.1 kB view hashes)

Uploaded Source

Built Distribution

vaxila_opentelemetry_util-0.0.1-py3-none-any.whl (4.0 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