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

Add opentelemetry requests hook to trace HTTP headers #795

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

vprivat-ads
Copy link
Contributor

@vprivat-ads vprivat-ads commented Jan 3, 2025

Optionally trace HTTP headers from requests/responses in OpenTelemetry.

Disabled by default (security), to enable it, define OTEL_PYTHON_REQUESTS_TRACE_HEADERS environment variable.

@vprivat-ads vprivat-ads force-pushed the feat/otel-add-http-headers branch from de6b2d0 to b9afb4a Compare January 3, 2025 14:30
@vprivat-ads vprivat-ads marked this pull request as ready for review January 3, 2025 14:34
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@vprivat-ads vprivat-ads force-pushed the feat/otel-add-http-headers branch from b9afb4a to e7a0df6 Compare January 3, 2025 14:34
Copy link
Contributor

@jgaucher-cs jgaucher-cs left a comment

Choose a reason for hiding this comment

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

@vprivat-ads do we need the same in rs-client-libraries ? Else I'm OK with this PR.

Copy link
Contributor

@nleconte-csgroup nleconte-csgroup left a comment

Choose a reason for hiding this comment

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

Is it only intended for local mode or should it be also applicable for the server mode (K8S) ? If so, we should modify the helm charts and the values in the infrastructure.

@vprivat-ads vprivat-ads force-pushed the feat/otel-add-http-headers branch from e7a0df6 to e9bfea4 Compare January 3, 2025 14:44
@vprivat-ads
Copy link
Contributor Author

@vprivat-ads do we need the same in rs-client-libraries ? Else I'm OK with this PR.

@jgaucher-cs no, I don't see a need on client side for now. It's very easy to update the code locally if needed, without having resort to OpenTelemetry. This change is useful in cluster mode to avoid having to build a new docker image.

Copy link

github-actions bot commented Jan 3, 2025

SonarQube Quality Gate Result

  • Result: ✅ OK
  • Branch: 795/merge
  • Triggered by @vprivat-ads on pull_request
Metric Status Value Error Threshold
New reliability rating ✅ OK 1 > 1
New security rating ✅ OK 1 > 1
New maintainability rating ✅ OK 1 > 1

View on SonarQube

updated: 1/3/2025, 15:07:57 (UTC+0)

@vprivat-ads vprivat-ads force-pushed the feat/otel-add-http-headers branch from e9bfea4 to b9cbe2b Compare January 3, 2025 14:58
Copy link

sonarqubecloud bot commented Jan 3, 2025

@vprivat-ads vprivat-ads merged commit c839841 into develop Jan 6, 2025
33 checks passed
@vprivat-ads vprivat-ads deleted the feat/otel-add-http-headers branch January 6, 2025 10:08
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