Low allocation OTLP trace marshaler#6410
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6410 +/- ##
============================================
- Coverage 91.12% 90.79% -0.34%
- Complexity 5856 6013 +157
============================================
Files 636 651 +15
Lines 17062 17709 +647
Branches 1733 1769 +36
============================================
+ Hits 15548 16079 +531
- Misses 1019 1113 +94
- Partials 495 517 +22 ☔ View full report in Codecov by Sentry. |
|
Rebase or merge #6411 ? |
cba329d to
3dc6585
Compare
jack-berg
left a comment
There was a problem hiding this comment.
This is looking really good! Left several comment but they all should be easy to resolve.
...ters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/StatelessMarshaler.java
Show resolved
Hide resolved
.../src/main/java/io/opentelemetry/exporter/internal/otlp/DoubleAnyValueStatelessMarshaler.java
Show resolved
Hide resolved
...n/src/main/java/io/opentelemetry/exporter/internal/otlp/ArrayAnyValueStatelessMarshaler.java
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/MarshalerUtil.java
Outdated
Show resolved
Hide resolved
...c/main/java/io/opentelemetry/exporter/internal/otlp/traces/SpanStatusStatelessMarshaler.java
Outdated
Show resolved
Hide resolved
...ain/java/io/opentelemetry/exporter/internal/otlp/traces/ResourceSpansStatelessMarshaler.java
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/marshal/Serializer.java
Show resolved
Hide resolved
.../src/test/java/io/opentelemetry/exporter/internal/otlp/traces/TraceRequestMarshalerTest.java
Show resolved
Hide resolved
.../java/io/opentelemetry/exporter/internal/otlp/traces/LowAllocationTraceRequestMarshaler.java
Outdated
Show resolved
Hide resolved
.../java/io/opentelemetry/exporter/internal/otlp/traces/LowAllocationTraceRequestMarshaler.java
Show resolved
Hide resolved
...lp/common/src/jmh/java/io/opentelemetry/exporter/internal/otlp/RequestMarshalBenchmarks.java
Outdated
Show resolved
Hide resolved
|
This is the part of the benchmark which gets me excited.
|
jack-berg
left a comment
There was a problem hiding this comment.
Just a couple of loose ends at this point.
...rters/common/src/test/java/io/opentelemetry/exporter/internal/marshal/MarshalerUtilTest.java
Outdated
Show resolved
Hide resolved
.../common/src/main/java/io/opentelemetry/exporter/internal/marshal/StatelessMarshalerUtil.java
Outdated
Show resolved
Hide resolved
jack-berg
left a comment
There was a problem hiding this comment.
Great stuff! Very excited about this!
|
@open-telemetry/java-approvers does anyone intend on reviewing this? If not, I'll merge so we can begin the followup work. |
I've discovered that the logic in the if statement that detects empty strings or null values and returns is causing serialization issues. When I input a stringKey with an empty string value, the empty value gets ignored. This results in output like (example): According to the OTEL protocol specification I've researched, the expected output should be: For detailed information, please refer to https://protobuf.dev/programming-guides/proto3/#default Can we remove the logic below ? |
|
Please open an issue @OisCircle so this comment doesn't get lost |
Subset of #6328 that contains only trace marshaling.