-
Notifications
You must be signed in to change notification settings - Fork 840
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
Low allocation OTLP metrics marshaler #6422
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6422 +/- ##
============================================
+ Coverage 90.85% 91.26% +0.41%
- Complexity 6028 6107 +79
============================================
Files 651 667 +16
Lines 17729 18114 +385
Branches 1777 1792 +15
============================================
+ Hits 16107 16532 +425
+ Misses 1105 1061 -44
- Partials 517 521 +4 ☔ 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.
Left a few straight forward comments, but looks good. Thanks!
...java/io/opentelemetry/exporter/internal/otlp/metrics/SummaryDataPointStatelessMarshaler.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/opentelemetry/exporter/internal/otlp/metrics/SummaryStatelessMarshaler.java
Outdated
Show resolved
Hide resolved
public int getBinarySerializedSize(SummaryData summary, MarshalerContext context) { | ||
int size = 0; | ||
size += | ||
StatelessMarshalerUtil.sizeRepeatedMessageWithContext( |
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.
What's the didfference between the sizeRepeatedMessageWithContext
overloads? One accepts a MarshalerContext.Key
and another doesn't.
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 ones with key use forEach
to traverse Collection
or Map
. Key is used to cache the Consumer
that is passed to forEach
. The ones without key use a counted loop.
Continuation of #6410