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 falcon request objects. #1158

Merged
merged 3 commits into from
Sep 29, 2020

Conversation

owais
Copy link
Contributor

@owais owais commented Sep 24, 2020

Description

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

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 test

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 falcon-request-attrs branch 4 times, most recently from 05942ea to 97dc1d4 Compare September 24, 2020 17:20
@owais owais marked this pull request as ready for review September 24, 2020 17:20
@owais owais requested a review from a team September 24, 2020 17:20
@owais owais force-pushed the falcon-request-attrs branch 4 times, most recently from 7739425 to 2bc7693 Compare September 24, 2020 18:30
OTEL_PYTHON_FALCON_TRACED_REQUEST_ATTRS env var can be set to a command
separated list of attributes names that will be extracted from Falcon's
request object and set as attributes on spans.
@lzchen
Copy link
Contributor

lzchen commented Sep 25, 2020

This seems like pretty cool functionality. Should we have a generic way of extracting custom attributes from any instrumentation request and populate the span attributes with?

@owais
Copy link
Contributor Author

owais commented Sep 25, 2020

I'm gonna send similar PR for Tornado soon. Perhaps we should look if we can have shared functionality after that. I think >3 is nice number to start abstracting away :) At least we could have a shared utility function to extract attributes and set on a span.

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.

Thanks, this LGTM. I agree that we should make this more generic soon, I've opened an issue to track this #1176

@lzchen lzchen merged commit 28e3a39 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