-
Notifications
You must be signed in to change notification settings - Fork 10
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
Support http-proxy for trace agent, remove proxy from dsd #658
Conversation
BenchmarksComparisonBenchmark execution time: 2024-10-02 18:42:29 Comparing candidate commit de6c44d in PR branch Found 24 performance improvements and 3 performance regressions! Performance is the same for 24 metrics, 2 unstable metrics. scenario:benching string interning on wordpress profile
scenario:concentrator/add_spans_to_concentrator
scenario:credit_card/is_card_number/
scenario:credit_card/is_card_number/ 3782-8224-6310-005
scenario:credit_card/is_card_number/ 378282246310005
scenario:credit_card/is_card_number/37828224631
scenario:credit_card/is_card_number/378282246310005
scenario:credit_card/is_card_number/37828224631000521389798
scenario:credit_card/is_card_number_no_luhn/
scenario:credit_card/is_card_number_no_luhn/ 3782-8224-6310-005
scenario:credit_card/is_card_number_no_luhn/ 378282246310005
scenario:credit_card/is_card_number_no_luhn/37828224631
scenario:credit_card/is_card_number_no_luhn/378282246310005
scenario:credit_card/is_card_number_no_luhn/37828224631000521389798
scenario:redis/obfuscate_redis_string
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
BaselineOmitted due to size. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #658 +/- ##
==========================================
+ Coverage 71.86% 71.97% +0.11%
==========================================
Files 271 271
Lines 40654 40628 -26
==========================================
+ Hits 29215 29242 +27
+ Misses 11439 11386 -53
|
@@ -30,8 +30,6 @@ pub async fn main() { | |||
Builder::from_env(env).target(Target::Stdout).init(); | |||
|
|||
let dd_api_key: Option<String> = env::var("DD_API_KEY").ok(); | |||
let dd_http_proxy: Option<String> = env::var("DD_HTTP_PROXY").ok(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was always wrong. DD_HTTP(S)_PROXY
is used for proxying requests made by the agent for checks or integrations. To proxy the agents connection to Datadog, we've required HTTPS_PROXY
be set.
The hyper-proxy dependency probably should be either behind a feature flag in trace-utils, or we support proxying in general, at which point it likely should become part of ddcommon. |
These tests are very slow in libdatadog: But when they were in the Lambda extension repo, they ran in thousandths of a second: |
@astuyve These are the miri tests. Miri does things and is slow by design, and some codes can make it even slower... They are still fast in e.g. |
What does this PR do?
reqwest supports system proxy by default, no code changes needed (just
HTTPS_PROXY
set).hyper client doesn't seem to, but this crate works and I'm able to see the proxied traffic logged and traces show up
squid proxy:
![image](https://private-user-images.githubusercontent.com/1598537/372237209-546c995d-4fbe-44c6-b0a9-09ec1eeaff0c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDg4OTAsIm5iZiI6MTczOTIwODU5MCwicGF0aCI6Ii8xNTk4NTM3LzM3MjIzNzIwOS01NDZjOTk1ZC00ZmJlLTQ0YzYtYjBhOS0wOWVjMWVlYWZmMGMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTcyOTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODE4NjhmNTk5ODM2ZjM3MDI4NDVmZDNmZmI4MzNlNDRhYzA2OGFmOGRiMzY3ZDg3MGUyODUyYTdjZmI4OTM0ZiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.gxfRdxMw1TCPwdENRjNwBOCYJ1CXNH5YTwVIArQuKTY)
![image](https://private-user-images.githubusercontent.com/1598537/372237282-82adccb3-121e-4c67-88ef-1a74a364e151.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDg4OTAsIm5iZiI6MTczOTIwODU5MCwicGF0aCI6Ii8xNTk4NTM3LzM3MjIzNzI4Mi04MmFkY2NiMy0xMjFlLTRjNjctODhlZi0xYTc0YTM2NGUxNTEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMTcyOTUwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MGE5MTU3ZjY4MjUyMzM3YTQwZTMyZGQ1Njc3ODlkYjM5ZmQ2OWYzNTEzNjBhZDVjN2JiZmFlNGNhMTc5NDA5ZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.Hxu9HVr0leqjIe5fU-bWjCy4XwmsiqkXUI4jNyOrjKs)
Traces:
Motivation
Support folks in isolated VPCs without privatelink access.
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.