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

Adding tracked_url_callback to RequestsInstrumentor #714

Merged
merged 13 commits into from
Oct 8, 2021

Conversation

benjaminsky
Copy link
Contributor

Description

Added a tracked_url_callback argument to RequestsInstrumentor for the purpose of excluding URLs you don't want tracked.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • instrumentation/opentelemetry-instrumentation-requests/tests/test_requests_integration.py::RequestsIntegrationTestBase::test_tracked_url_callback

Does This PR Require a Core Repo Change?

  • No.

Checklist:

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

@benjaminsky benjaminsky requested a review from a team October 5, 2021 17:10
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 5, 2021

CLA Signed

The committers are authorized under a signed CLA.

@lzchen
Copy link
Contributor

lzchen commented Oct 5, 2021

We have this functionality right now for server instrumentations through environment variable. It will probably be good to use the same mechanism.

@benjaminsky
Copy link
Contributor Author

We have this functionality right now for server instrumentations through environment variable. It will probably be good to use the same mechanism.

Done

CHANGELOG.md Outdated Show resolved Hide resolved
owais and others added 2 commits October 6, 2021 23:53
Co-authored-by: Leighton Chen <lechen@microsoft.com>
@owais owais enabled auto-merge (squash) October 6, 2021 19:44
"OTEL_PYTHON_REQUESTS_EXCLUDED_URLS": "http://localhost/env_excluded_arg/123,env_excluded_noarg"
},
)
self.env_patch.start()
Copy link
Member

Choose a reason for hiding this comment

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

Stop the patch in teardown.

auto-merge was automatically disabled October 6, 2021 20:50

Head branch was pushed to by a user without write access

@owais owais enabled auto-merge (squash) October 8, 2021 21:02
@owais owais merged commit 5be20f9 into open-telemetry:main Oct 8, 2021
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.

4 participants