Skip to main content

Digma instrumentation for Django

Project description

opentelemetry-instrumenation-digma

PyPI version

This package provides instrumentation for additional span attributes provided on top of the opentelmetery-instrumentation-django package.

In order to be able to effectively glean code-object based insights for continuous feedback and map them back in the IDE, Digma inserts additional attribute into the OTEL resource attributes.

Installing the package

pip install opentelemetry-instrumentation-digma-django

Via pip, or add to your requirements/toml file and update your environment.

Building the package from source

python -m build

Instrumenting your Django project

The Digma instrumentation depends on the official opentelemetry instrumentation or some other middleware to create and manage span lifecycle for each request.

It can be used alongside the generic Digma Instrumentation helpers to quickly set up your OTEL configuration

digma_opentelmetry_boostrap(service_name='django-ms',
                            digma_backend='http://localhost:5050',
                            configuration=DigmaConfiguration().trace_this_package())
DjangoInstrumentor().instrument()
DigmaIntrumentor.instrument()

The Digma django instrumentation will simply add the view function and namespace using the Opentelemtry semantic convention. We have requested to include this functionality as a part of the more general opentelemetry-instrumenation-django package. Help us by upvoting this FR!

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

Built Distribution

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