-
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
[exporterhelper, exporterqueue] Deprecate unused public symbols #11285
base: main
Are you sure you want to change the base?
[exporterhelper, exporterqueue] Deprecate unused public symbols #11285
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11285 +/- ##
==========================================
- Coverage 91.91% 91.86% -0.06%
==========================================
Files 432 434 +2
Lines 20350 20371 +21
==========================================
+ Hits 18705 18713 +8
- Misses 1271 1285 +14
+ Partials 374 373 -1 ☔ View full report in Codecov by Sentry. |
adb2704
to
2c722a7
Compare
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.
Looks good, just one comment about deprecating the whole of exporterqueue
I don't think we should "delete" everything that is not used. Please at least consider to wait until @dmitryax reviews and approves this. |
@dmitryax do you have an opinion on how we should proceed regarding the batching API? |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Description
To help stabilize the
exporter
module faster, this PR deprecates some public symbols fromexporterhelper
and the entirety ofexporterqueue
, which don't seem to be used by anyone on Github, so that they might be fully internalized in a future release.(Another option would be removing them entirely, if some aren't used internally. Yet another would be moving them to a new module as suggested by #11143, if it turns out some are currently in use in the ecosystem.)
All the symbols involved were introduced by #8122; of the symbols introduced by that PR, only
WithBatcher
is used in the ecosystem, and thus isn't deprecated by this PR. It has a variable argument of typeBatcherOption
, which is deprecated as it isn't used. A future release should remove this variable argument.To avoid the linter complaining about internal use of deprecated symbols,
exporterqueue
functionality was split into an internal package with most of the functionality, and deprecated aliases in the old exporterqueue package. The new internal package isexporter/internal/exporterqueue
instead ofexporter/exporterqueue/internal
, to allow its internal use byexporter/exporterhelper
.An issue arose with the aliasing process:
exporterqueue
exports multiple generic types, but generic aliases are only supported starting from Go 1.23. So, unless we wish to update the Go version soon, the only option was to declare a different defined type, and convert at runtime between the two in the alias function shims. There is some surprising behavior in exactly which equivalent types Go allows to convert between, which leads to some strange code in said shims.Link to tracking issue
Updates #11142