-
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] New exporter helper for custom requests #8178
Conversation
43e39ea
to
36d90a0
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #8178 +/- ##
==========================================
- Coverage 90.27% 90.16% -0.12%
==========================================
Files 301 302 +1
Lines 15596 15733 +137
==========================================
+ Hits 14080 14186 +106
- Misses 1227 1254 +27
- Partials 289 293 +4
☔ View full report in Codecov by Sentry. |
d175cf6
to
e6e47f0
Compare
Introduce a new exporter helper that operates over client-provided requests instead of pdata. The helper user now has to provide Converter - an interface with a function implementing translation of pdata Metrics/Traces/Logs into a user-defined Request. Request is an interface with only one required function Export. It opens a door for moving batching to the exporter, where batches will be built from client data format, instead of pdata. The batches can be properly sized by custom request size, which can be different from OTLP. The same custom request sizing will be applied to the sending queue. It will also improve the performance of the sending queue retries for non-OTLP exporters, they don't need to translate pdata on every retry.
e6e47f0
to
4bc4b63
Compare
Co-authored-by: Alex Boten <[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.
The change looks ok, just one question and a suggestion
Co-authored-by: Alex Boten <[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.
Looks nice, I prefer this over the previous PR.
@codeboten, how did it happen to be added to 0.83.0? It should be part of 0.84.0, right? |
@dmitryax yeah sorry i tagged it incorrectly.... let me revisit the milestone labeling i did manually yesterday |
The method was removed from the Request interface in open-telemetry#8178, so the implementation on the test structs is not required anymore
Introduce a new exporter helper that operates over client-provided requests instead of pdata. The helper user now has to provide
Converter
- an interface with a function implementing translation of pdata Metrics/Traces/Logs into a user-definedRequest
.Request
is an interface with only one required functionExport
.It opens a door for moving batching to the exporter, where batches will be built from client data format, instead of pdata. The batches can be properly sized by custom request size, which can be different from OTLP. The same custom request sizing will be applied to the sending queue. It will also improve the performance of the sending queue retries for non-OTLP exporters, they don't need to translate pdata on every retry.
This is an implementation alternative to #7874 as suggested in #7874 (comment)
Tracking Issue: #8122