-
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 Shift to zero-code instrumentaton #747
HPCC4J-612 Shift to zero-code instrumentaton #747
Conversation
Jira Issue: https://hpccsystems.atlassian.net/browse/HPCC4J-612 Jirabot Action Result: |
@jpmcmu please review |
7ac51c3
to
a3ca6b8
Compare
@jpmcmu updated please review. |
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.
A few questions / changes
pom.xml
Outdated
<!-- Not managed by opentelemetry-bom --> | ||
<groupId>io.opentelemetry.instrumentation</groupId> | ||
<artifactId>opentelemetry-instrumentation-annotations</artifactId> | ||
<version>2.6.0</version> |
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 should be declared above as variable with the rest of the version
@@ -3,6 +3,8 @@ | |||
import org.hpccsystems.ws.client.utils.Connection; | |||
import org.hpccsystems.ws.client.utils.ObjectPool; | |||
|
|||
//import io.opentelemetry.instrumentation.annotations.WithSpan; |
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.
Do we still need this commented out lines?
import io.opentelemetry.instrumentation.annotations.SpanAttribute; | ||
import io.opentelemetry.instrumentation.annotations.WithSpan; | ||
|
||
//import io.opentelemetry.instrumentation.annotations.WithSpan; |
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.
Duplicate commented out import
{ | ||
if (method == null || method.isEmpty()) | ||
throw new Exception ("Must provide valid HTTP method"); | ||
|
||
URL url = new URL (getBaseUrl() + (uri != null && uri.startsWith("/") ? "" : "/") + uri); | ||
|
||
Span sendHTTPReqSpan = GlobalOpenTelemetry.get().getTracer(BaseHPCCWsClient.PROJECT_NAME) | ||
/*Span sendHTTPReqSpan = GlobalOpenTelemetry.get().getTracer(BaseHPCCWsClient.PROJECT_NAME) |
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.
Are you planning on keeping this around in case we want to re-enable?
else | ||
{ | ||
sendHTTPReqSpan.setAttribute("hasCredentials", false); | ||
//sendHTTPReqSpan.setAttribute("hasCredentials", true); |
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 discussed this briefly, but does the Zero-code stuff set the currentSpan()? If it does could we grab the current span and use it to add additional attributes?
a3ca6b8
to
f68e38b
Compare
@jpmcmu please review latest changes |
64ec587
to
698c498
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.
@rpastrana looks good to me
- Removes manually declared spans - Adds WithSpan annotations on several clients - Adds hascredentials span attribute to current span - Ensures executeECLScript is traced Signed-off-by: Pastrana <[email protected]>
698c498
to
ca685f9
Compare
Jirabot Action Result: |
Signed-off-by: Pastrana <[email protected]> Co-authored-by: Pastrana <[email protected]>
Signed-off-by: Pastrana <[email protected]> Co-authored-by: Pastrana <[email protected]>
Type of change:
Checklist:
Testing: