-
Notifications
You must be signed in to change notification settings - Fork 24
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
HPCC4J-612 Ensure proper OTel SDK initialization #745
HPCC4J-612 Ensure proper OTel SDK initialization #745
Conversation
@jpmcmu I don't expect this to be the final draft, but please take a look and comment on the overall approach. |
Jira Issue: https://hpccsystems.atlassian.net/browse/HPCC4J-612 Jirabot Action Result: |
pom.xml
Outdated
@@ -135,6 +135,11 @@ | |||
<groupId>io.opentelemetry</groupId> | |||
<artifactId>opentelemetry-exporter-otlp</artifactId> | |||
</dependency> | |||
<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.
this is not needed for this change
if (Utils.isOtelJavaagentUsed()) | ||
{ | ||
System.out.println("Otel javaagent enabled, will not initialize Otel SDK"); | ||
globalOTel = GlobalOpenTelemetry.get(); |
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 happens if otel javaegent incorrectly configured?
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.
apparently the process is stopped:
Error opening zip file or JAR manifest missing : opentwelemetry-javaagent.jar
Error occurred during initialization of VM
agent library failed to init: instrument
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.
@rpastrana looks pretty good, a few comments but nothing critical IMO
else | ||
{ | ||
globalOTel = GlobalOpenTelemetry.get(); | ||
if (Utils.isOtelJavaagentUsed()) |
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.
Should we add an env variable to override to turn this behavior off? IE: If we get a false positive from a non-otel java agent and the user needs to enable the AutoSDK.
- Adds util functions to detect use of otel javaagent - Adds logic to optionally bypass manual initialization of otelsdk Signed-off-by: Pastrana <[email protected]>
e29d98b
to
1e63cf6
Compare
@jpmcmu take a look at latest changes. |
@rpastrana looks good to me |
Jirabot Action Result: |
Jirabot Action Result: |
Type of change:
Checklist:
Testing: