-
Notifications
You must be signed in to change notification settings - Fork 573
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
jaegerremote: Add WithSamplingStrategyFetcher option #4045
jaegerremote: Add WithSamplingStrategyFetcher option #4045
Conversation
Please add a unit test. |
Please sign the CLA so these changes can be considered. |
Codecov Report
@@ Coverage Diff @@
## main #4045 +/- ##
=====================================
Coverage 82.2% 82.2%
=====================================
Files 144 144
Lines 10005 10002 -3
=====================================
Hits 8226 8226
+ Misses 1638 1636 -2
+ Partials 141 140 -1
|
It looks like Jaeger sampling is deprecated
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.
PS. Only "Client Sampling" is deprecated https://www.jaegertracing.io/docs/1.47/sampling/
@morus12 Can you please update the branch? |
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.
Few things needs to be addressed.
@morus12 Do you plan to update the PR and address the comments? |
Let me know if you need any other changes. |
PR has significant changes.
Co-authored-by: Damien Mathieu <[email protected]>
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.
Waiting for codeowner (@yurishkuro) review.
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.
Lgtm, although I don't follow the need to clone the transport.
@morus12 Please address #4045 (comment) and update the branch and I will merge the PR 🎉 |
@morus12 Thank you for your contribution and have a nice weekend 😉 |
I appreciate your help! |
Fixed an issue where the fetcher would panic if the default transport is not of type *http.Transport due to the cast:
customTransport := http.DefaultTransport.(*http.Transport).Clone()
To address this, we've now set the
http.Client.Timeout
rather thancustomTransport.ResponseHeaderTimeout
to prevent panic.This PR exposes SamplingStrategyFetcher and WithSamplingStrategyFetcher, enabling the definition of a custom fetcher that utilizes a custom HTTP client with a transport other than *http.Transport. We have integrated httpmock, which clashes with the default http.Client. To address this, we employ custom HTTP clients in our fetcher implementation.