-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HIVE-28505: OTEL: Implement OTEL Exporter to expose query details from HiveServer2. #5439
Conversation
<groupId>io.opentelemetry</groupId> | ||
<artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId> | ||
<version>${otel.version}</version> | ||
</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.
Please add io.opentelemetry:opentelemetry-exporter-otlp
as a dependency here as well.
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.
Added
} else { | ||
Span span = tracer.spanBuilder("LiveQuery" + lQuery.getQueryDisplay().getQueryId()) | ||
.setAllAttributes(getAttributes(lQuery)).setStartTimestamp(lQuery.getBeginTime(), TimeUnit.MILLISECONDS) | ||
.startSpan(); |
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.
We should be starting span and then setting the attributes.
Something like:
Span span = tracer.spanBuilder("LiveQuery" + lQuery.getQueryDisplay().getQueryId()).startSpan();
span.setAllAttributes(getAttributes(lQuery)).setStartTimestamp(lQuery.getBeginTime(), TimeUnit.MILLISECONDS);
Current approach is causing NULL pointer exception intermittently and interrupts the thread.
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.
Changed, let me know if it looks good, timestamp needs to be set before only, there is no method in Span
it is there in builder only
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.
I'll test and let you know if it works fine.
ca3d9f8
to
342b7e6
Compare
342b7e6
to
4821a0c
Compare
|
What changes were proposed in this pull request?
Implement OTEL Exporter to expose basic query details from HiveServer2
Why are the changes needed?
Better Usability & introduce various OTEL Clients to fetch query data
Does this PR introduce any user-facing change?
OTEL Clients can be configured to fetch data from HS2
Is the change a dependency upgrade?
No
How was this patch tested?
Mannual/Pending