-
Notifications
You must be signed in to change notification settings - Fork 5.5k
EventListener - OpenTelemetry integration #25490
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
base: master
Are you sure you want to change the base?
EventListener - OpenTelemetry integration #25490
Conversation
|
94e4a7d
to
ebe86ed
Compare
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.
LGTM % some small changes
presto-main/etc/config.properties
Outdated
@@ -26,6 +26,10 @@ scheduler.http-client.idle-timeout=1m | |||
query.client.timeout=5m | |||
query.min-expire-age=30m | |||
|
|||
tracing.tracer-type=otel |
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 undo changes here, they are not needed for Presto to be useful OOTB
@@ -183,12 +183,12 @@ public void run() | |||
} | |||
injector.getInstance(PasswordAuthenticatorManager.class).loadPasswordAuthenticator(); | |||
injector.getInstance(PrestoAuthenticatorManager.class).loadPrestoAuthenticator(); | |||
injector.getInstance(TracerProviderManager.class).loadTracerProvider(); |
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 undo this since its a no-op change
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.
This change is needed as the Tracer provider needs to be loaded before the event listener
/** | ||
* Add a new block starting at current time to the trace | ||
* @param blockName the name for the added tracing block | ||
* @param blockName the name for the parent tracing block |
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.
* @param blockName the name for the parent tracing block | |
@param parentBlockName the name for the parent tracing block |
@@ -155,6 +156,32 @@ public void startBlock(String blockName, String annotation) | |||
} | |||
} | |||
|
|||
/** | |||
* Create new span with Open Telemetry tracer |
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.
* Create new span with Open Telemetry tracer | |
Creates a new span |
we already are in the OpenTelemetryTracer class
Also add a
* @throws PrestoException if a blockName already is already used in the existing span map
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.
Can we keep the javadocs only on the SPI Tracer
class ?
public void startBlock(String blockName, String parentBlockName, String annotation) | ||
{ | ||
if (spanMap.containsKey(blockName)) { | ||
throw new PrestoException(DISTRIBUTED_TRACING_ERROR, "Duplicated block inserted: " + blockName); |
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.
throw new PrestoException(DISTRIBUTED_TRACING_ERROR, "Duplicated block inserted: " + blockName); | |
throw new PrestoException(DISTRIBUTED_TRACING_ERROR, String.format("Duplicate block inserted: %s ", blockName)); |
1bdf496
to
754f557
Compare
Description
Integrate EventListener and OpenTelemetry to provide query tracing through OTel
Motivation and Context
Integrate EventListener and OpenTelemetry to provide query tracing
Impact
Test Plan
Tested locally with a custom event listener which transforms event listener data to OTel traces
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.