-
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 the Duplicated code in OTLP Exporter with config part #2684
Refactor the Duplicated code in OTLP Exporter with config part #2684
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2684 +/- ##
======================================
Coverage 76.7% 76.7%
======================================
Files 181 177 -4
Lines 12175 12066 -109
======================================
- Hits 9345 9263 -82
+ Misses 2605 2579 -26
+ Partials 225 224 -1
|
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.
If we are going to extract this out to a common base between metrics and traces we need to be extra careful that dependencies don't leak between them, or out into the API.
This won't be acceptable until the exporter's dependencies are contained within the exporter only.
go.mod
Outdated
go.opentelemetry.io/otel/exporters/otlp/internal/retry v0.0.0-00010101000000-000000000000 | ||
go.opentelemetry.io/otel/trace v1.5.0 | ||
google.golang.org/grpc v1.45.0 |
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 change will add the otlp internals to every project that depends on the otel API. Which is why every example and bridge just gained 40-50 lines of dependences in the go.sum files.
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.
I agree, but I didn't notice when this dependency was introduced. Do you have some suggestions to resolve this problem? @MadVikingGod
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.
My guess is that exporters/otlp/internal
is under the main otlp mod (/go.mod
) so when you moved these there you brought with it the grpc etc dependencies.
To house it there you will need a mod somewhere, either /exporter/otlp, /exporters/otlp/internal or /exporters/otlp/internal/pkg. I would experiment what works best and also remember to add it to the versions.yaml and run make crosslink
or make precommit
.
Tnanks for advice, I've added the go.mod in |
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.
Other then the Changelog LGTM
- The metrics API has been significantly changed. (#2587) | ||
- Refactored the duplicated part in OTLP exporter trace and metrics config. (#2684) |
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 should go in the unreleased section, and only have this PR's change.
Fix: part of #2641
exporter/otlp/otlpmetric(otlptrace)/internal/
intoexporter/otlp/internal/envconfig
exporter/otlp/otlpmetric(otlptrace)/internal/
intoexporter/otlp/internal/transform
exporter/otlp/otlpmetric(otlptrace)/internal/
exporter/otlp/internal/connection