Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to extract span attributes from django request objects. #1154

Merged
merged 5 commits into from
Sep 29, 2020

Conversation

owais
Copy link
Contributor

@owais owais commented Sep 24, 2020

Description

OTEL_PYTHON_DJANGO_TRACED_REQUEST_ATTRS env var can be set to a command
separated list of attributes names that will be extracted from Django's
request object and set as attributes on spans.

This is ported from OpenTracing Django instrumentation to make the upgrade path smoother for OpenTracing users. (github.com/opentracing-contrib/python-django)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit Tests

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@owais owais force-pushed the django-request-attrs branch 3 times, most recently from fd0dd61 to b4ce083 Compare September 24, 2020 13:19
@owais owais marked this pull request as ready for review September 24, 2020 13:19
@owais owais requested a review from a team September 24, 2020 13:19
OTEL_PYTHON_DJANGO_TRACED_REQUEST_ATTRS env var can be set to a command
separated list of attributes names that will be extracted from Django's
request object and set as attributes on spans.
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codeboten codeboten merged commit 1522b44 into open-telemetry:master Sep 29, 2020
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants