-
Notifications
You must be signed in to change notification settings - Fork 0
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
METRICS-4792 : OpenTelemetry Traces Protobuf InputFormat #129
Conversation
Config unit tests Fix dimension test Introduce config class Fix style Add serde test Prior to unit testing Fix style errors Add some dimensions
Benchmark + Test coverage Add Benchmark Add Benchmark / Fix tests Improved test coverage Fix line breaks Fix config builder clean up test cases fix distribution file
|
<dependency> | ||
<groupId>nl.jqno.equalsverifier</groupId> | ||
<artifactId>equalsverifier</artifactId> | ||
<scope>test</scope> | ||
</dependency> |
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.
adding a whole new dependency for a single test seems a little heavyweight? Can we accomplish that without this additional dependency?
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 Equals tests are required to meet the code coverage threshold. (More details in the comment below)
Given there are 10 fields to check, I think it would be better to use this library as it covers all the negative branch cases too.
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.
ok, I wonder why we don't need it for metrics input format. It looks like we already use this dependency elsewhere in druid so I'm ok using that here.
...e/druid/data/input/opentelemetry/protobuf/traces/OpenTelemetryTracesProtobufInputFormat.java
Outdated
Show resolved
Hide resolved
...uid/data/input/opentelemetry/protobuf/traces/OpenTelemetryTracesProtobufInputFormatTest.java
Show resolved
Hide resolved
...druid/data/input/opentelemetry/protobuf/traces/OpenTelemetryTracesProtobufConfiguration.java
Outdated
Show resolved
Hide resolved
...he/druid/data/input/opentelemetry/protobuf/traces/OpenTelemetryTracesProtobufReaderTest.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/druid/data/input/opentelemetry/protobuf/OpenTelemetryInputFormat.java
Outdated
Show resolved
Hide resolved
...druid/data/input/opentelemetry/protobuf/traces/OpenTelemetryTracesProtobufConfiguration.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/druid/data/input/opentelemetry/protobuf/OpenTelemetryProtobufReader.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/druid/data/input/opentelemetry/protobuf/OpenTelemetryProtobufReader.java
Outdated
Show resolved
Hide resolved
fixed config tests fix default test Fix access
...ns/src/main/java/org/apache/druid/data/input/opentelemetry/protobuf/OpenXProtobufReader.java
Outdated
Show resolved
Hide resolved
...e/druid/data/input/opentelemetry/protobuf/traces/OpenTelemetryTracesProtobufInputFormat.java
Outdated
Show resolved
Hide resolved
3682487
to
348c0be
Compare
b74a499
to
c05a185
Compare
@@ -212,9 +212,9 @@ | |||
<module>extensions-contrib/aliyun-oss-extensions</module> | |||
<module>extensions-contrib/prometheus-emitter</module> | |||
<module>extensions-contrib/opentelemetry-emitter</module> | |||
<module>extensions-contrib/opentelemetry-extensions</module> |
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.
Reason for this move up:
Semaphore build jobs were failing with the following error:
[ERROR] Failed to execute goal de.thetaphi:forbiddenapis:3.2:check (default-cli) on project druid-opencensus-extensions:
Check for forbidden API calls failed while scanning class 'org.apache.druid.data.input.opencensus.protobuf.OpenCensusProtobufInputRowParser'
(OpenCensusProtobufInputRowParser.java): java.lang.ClassNotFoundException: org.apache.druid.data.input.opentelemetry.protobuf.AbstractProtobufReader (while looking up details about referenced class 'org.apache.druid.data.input.opencensus.protobuf.OpenCensusProtobufReader') -> [Help 1]
It looked like the forbiddenapis
check was failing because of some classpath issue, even though the compilation step was passing. I wasn't able to reproduce this failure consistently on my laptop (but failed every time in Semaphore)
This issue looks to be closely related.
I initially tried using the @SuppressForbidden
annotation for the OpenCensusProtobufInputRowParser
class and that led to the same error for the OpenCensusProtobufReader
class.
Ultimately Semaphore jobs passed with this change. I'm not sure how this change in module ordering fixes up the forbiddenapis
check.
Empty-Commit
f03e847
to
7f5e5ba
Compare
Description
Add an OpenTelemetry Traces InputFormat so that Druid can ingest records that are in the form of an OpenTelemetry Traces Protobuf.
Note: This does not cover some fields in Otel Trace proto such as
Events
andLinks
. The extension as a whole is meant to be contributed upstream for further improvements and maintenance.Key changed/added classes in this PR
OpenTelemetryInputFormat
/OpenTelemetryProtobufReader
OpenTelemetryTracesProtobufReader
OpenTelemetryTracesProtobufInputFormat
Testing
Local testing
This PR has: