When Flask activation is missing, do not emit a log message#253
Merged
codeboten merged 5 commits intoopen-telemetry:masterfrom Dec 15, 2020
Merged
Conversation
If a Flask request doesn't have an active span, it just means that it was initialized via a mechanism that doesn't run `before_request`, like `app.test_request_context` or even manually. It is okay and instrumentation still works.
lzchen
approved these changes
Dec 14, 2020
codeboten
approved these changes
Dec 14, 2020
Contributor
codeboten
left a comment
There was a problem hiding this comment.
Thanks for the PR! The branch needs updating and I added a comment regarding where in the changelog this should be. Once the branch is updated we can merge!
CHANGELOG.md
Outdated
| ([#212](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/212)) | ||
| - `opentelemetry-instrumentation-fastapi` Added support for excluding some routes with env var `OTEL_PYTHON_FASTAPI_EXCLUDED_URLS` | ||
| ([#237](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/237)) | ||
| - `opentelemetry-instrumentation-flask` Do not emit a warning message for request contexts created with `app.test_request_context` or manually. |
Contributor
There was a problem hiding this comment.
This should probably go under Changed
Contributor
Author
|
@codeboten since my changes are a merge of |
Contributor
|
@jpmelos |
Contributor
Author
|
@lzchen all checks passed now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
If a Flask request doesn't have an active span, it just means that it was initialized via a mechanism that doesn't run
before_request, likeapp.test_request_contextor even manually. It is okay and instrumentation still works.Fixes #160.
Type of change
How Has This Been Tested?
I ran the same script that is in #160 and I didn't get the warning message.
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.
Unit tests have been addedNot neededDocumentation has been updatedNot needed