-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Refactor OTLP exporter env config to be shared across all exporters #2608
Conversation
This doesn't introduce any changes to public APIs. So I didn't add a changelog entry. |
Codecov Report
@@ Coverage Diff @@
## main #2608 +/- ##
=======================================
- Coverage 75.6% 75.6% -0.1%
=======================================
Files 171 172 +1
Lines 11629 11551 -78
=======================================
- Hits 8801 8736 -65
+ Misses 2615 2605 -10
+ Partials 213 210 -3
|
I just made a quick look and the approach LGTM. |
I still think this should have a changelog entry. It may not change any public APIs, but it may change behavior and having a changelog entry may help users to know that there was a change in this area that may be related to any issues they experience. Skipping the changelog entry should be for things like documentation changes or test-only changes. |
@dmathieu Is it so? Could you please explain in the PR description? It looks like pure refactoring which should be invisible to the user. |
No, this shouldn't change the behavior in any way a user of the exporter would notice. The API remains the same, and environment variables also keep the same behavior. |
@Aneurysm9 As a user, I find internal refactoring changelog entries as noise. Still, up to you. I respect your decisions 👍 |
This is the core of my point. While no behavior change is intended, that is different from no behavior change being possible. Without an indication in the changelog that a change was made to this exporter a user who is experiencing a regression may be misled and delayed in identifying this change as a potential cause. |
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
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
…pen-telemetry#2608) * setup global envconfig package for otlp exporter * use envconfig in otlpmetrics package * fix lint * add changelog entry * Update exporters/otlp/internal/envconfig/envconfig.go Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> * fix lint Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com> Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
The envconfig from both OTLP exporters is highly repeated code.
As we want to remove the gRPC dependency from HTTP packages, we would need to duplicate even more.
So this is a proposal to make it somewhat reusable.
There is still some code repetition, as it wouldn't be trivial to extract
GenericOption
into a shared package. However, I believe this moves in the right direction, as quite a bit of logic is now being shared.