-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 confighttp.WithOtelHTTPOptions #11769
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11769 +/- ##
=======================================
Coverage 91.45% 91.45%
=======================================
Files 447 447
Lines 23721 23726 +5
=======================================
+ Hits 21694 21699 +5
Misses 1653 1653
Partials 374 374 ☔ View full report in Codecov by Sentry. |
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.
otelhttp
is not 1.0 and has no plans to be 1.0 in the foreseeable future. Introducing this as part of the public API of confighttp
would prevent us from marking it as 1.0 until otelhttp
is marked as 1.0.
Is there a way to introduce this so that WithOtelHTTPOptions
either does not depend on a symbol in otelhttp
or is not in the confighttp
package?
|
/easycla |
|
5000fc5
to
6c102f2
Compare
Signed-off-by: Yuri Shkuro <[email protected]>
6c102f2
to
d4f6608
Compare
/easycla |
Agreed
Worst case scenario is that the concept is removed altogether. I think this is extremely unlikely, but we wouldn't have a non-breaking way of dealing with it.
The particular rule we are breaking is this one from the VERSIONING.md doc:
I am fine accepting this change if we first amend VERSIONING.md to reflect the new policy we are following. |
Hm, I don't know how we can do this without exposing otelhttp.Option type. We could fully duplicate their options and translate, but that feels like a massive overkill. |
One way of doing this without changing |
don't think it will work, the options operate on a private struct in |
The way to do this is to move the struct to an internal package, define all options in that internal package and re-export them in the appropriate module (the |
I don't follow that. Internal package would have to be in some module, so another module would not be able to reference it. But if we do it in the same module with an experimental sub-package then it could work, e.g |
@yurishkuro Here is a more explicit explanation of the pattern: https://dmathieu.com/en/development/go-architecture-semver/stable-experimental-modules/ I think we are talking about the same thing |
Description
Add ability to provide OTel HTTP intrumentation options to
ToServer()
function.Link to tracking issue
Fixes #11770
Related to jaegertracing/jaeger#6265
Testing
Added unit test