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

feat: add header extraction parameters to FastAPIInstrumentor().instrument_app #2241

Merged
merged 9 commits into from
Aug 1, 2024

Conversation

samuelcolvin
Copy link
Contributor

@samuelcolvin samuelcolvin commented Feb 16, 2024

Description

Continuing from the work done in #2026 by @adriangb, this adds three new keyword parameters to FastAPIInstrumentor().instrument_app:

  • http_capture_headers_server_request
  • http_capture_headers_server_response
  • http_capture_headers_sanitize_fields

All 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.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added TestHTTPAppWithCustomHeadersParameters

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

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

@samuelcolvin samuelcolvin requested a review from a team as a code owner February 16, 2024 11:13
@samuelcolvin
Copy link
Contributor Author

sorry about that, linting fixed hopefully.

@tammy-baylis-swi
Copy link
Contributor

Lgtm too. Please could you fix the Changelog merge conflict that popped up after the 1.23.0 release.

@samuelcolvin
Copy link
Contributor Author

Lgtm too. Please could you fix the Changelog merge conflict that popped up after the 1.23.0 release.

Thanks, done.

@samuelcolvin
Copy link
Contributor Author

@lzchen I've corrected those things.

@lzchen lzchen enabled auto-merge (squash) March 18, 2024 21:01
auto-merge was automatically disabled March 22, 2024 23:49

Pull Request is not mergeable

@ocelotl ocelotl merged commit 3e18560 into open-telemetry:main Aug 1, 2024
389 checks passed
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.

None yet

6 participants