feat: add header extraction parameters to FastAPIInstrumentor().instrument_app#2241
Merged
ocelotl merged 9 commits intoopen-telemetry:mainfrom Aug 1, 2024
Merged
Conversation
samuelcolvin
commented
Feb 16, 2024
xrmx
reviewed
Feb 19, 2024
instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
Outdated
Show resolved
Hide resolved
Contributor
Author
|
sorry about that, linting fixed hopefully. |
srikanthccv
approved these changes
Feb 20, 2024
Contributor
|
Lgtm too. Please could you fix the Changelog merge conflict that popped up after the 1.23.0 release. |
be08067 to
d7f370b
Compare
Contributor
Author
Thanks, done. |
lzchen
reviewed
Mar 7, 2024
.../opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
Outdated
Show resolved
Hide resolved
lzchen
reviewed
Mar 7, 2024
.../opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
Show resolved
Hide resolved
Contributor
Author
|
@lzchen I've corrected those things. |
lzchen
approved these changes
Mar 18, 2024
e7ee41f to
1e8ba91
Compare
auto-merge was automatically disabled
March 22, 2024 23:49
Pull Request is not mergeable
1e8ba91 to
f4bcaa8
Compare
xrmx
pushed a commit
to xrmx/opentelemetry-python-contrib
that referenced
this pull request
Jan 24, 2025
…rument_app` (open-telemetry#2241) * add header parameters to FastAPIInstrumentor().instrument_app * add changelog * move open-telemetry#2072 changelog to unreleased * remove accidental pprint * linting * future annotations for fastapi * same logic for instrument() * Fix lint * Fix test case --------- Co-authored-by: Diego Hurtado <ocelotl@users.noreply.github.com>
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
Continuing from the work done in #2026 by @adriangb, this adds three new keyword parameters to
FastAPIInstrumentor().instrument_app:http_capture_headers_server_requesthttp_capture_headers_server_responsehttp_capture_headers_sanitize_fieldsAll of course have the same meaning and behavior as in the asgi
OpenTelemetryMiddleware- they're just passed straight through to that middleware.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added
TestHTTPAppWithCustomHeadersParametersDoes This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.