Skip to content
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

[3.x] - Migrate opentracing to Helidon Tracing #7709

Merged

Conversation

dalexandrov
Copy link
Contributor

Resolves #7617 for Helidon 3

Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@dalexandrov dalexandrov added tracing 3.x Issues for 3.x version branch labels Oct 3, 2023
@dalexandrov dalexandrov self-assigned this Oct 3, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 3, 2023
}
Tags.COMPONENT.set(span, "dbclient");
Tags.DB_TYPE.set(span, serviceContext.dbType());
Tag.COMPONENT.create("dbclient").apply(span);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the part Tag.COMPONENT.create("dbclient") should be done just once and stored in a constant, there is no need to re-create it for every reported span

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

Tags.ERROR.set(span, Boolean.TRUE);
span.log(Map.of("event", "error",
"error.kind", "Exception",
Tag.ERROR.create(Boolean.TRUE).apply(span);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace the whole thing with span.end(throwable) - this is all handled already (see OpenTracingSpan.end(Throwable))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

/**
* Tag marking an Error.
*/
public static final TagSource<Boolean> ERROR = new BooleanTagSource("error");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tag does not belong here and should not be used (see comment above)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Signed-off-by: Dmitry Aleksandrov <dmitry.aleksandrov@oracle.com>
@dalexandrov dalexandrov merged commit bb022d4 into helidon-io:helidon-3.x Oct 5, 2023
12 checks passed
@dalexandrov dalexandrov deleted the 7617_migrate-opentracing_3x branch October 5, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x Issues for 3.x version branch OCA Verified All contributors have signed the Oracle Contributor Agreement. tracing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dbclient: remove dependency on opentracing-api
2 participants