Skip to content

Skip loading the agent if traceable agent has been loaded #180

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

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

pavolloffay
Copy link
Member

Signed-off-by: Pavol Loffay p.loffay@gmail.com

This is needed for dynamic attach, our attacher might try to attach new agent even though the old one has already been attached.

Signed-off-by: Pavol Loffay <p.loffay@gmail.com>

private static boolean isTraceableAgentLoaded() {
try {
Class.forName("ai.traceable.agent.bootstrap.AgentContext", true, null);
Copy link
Member Author

Choose a reason for hiding this comment

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

this uses bootstrap classloader and this class seems to be there from the beginning. cc) @surajpuvvada

@pavolloffay pavolloffay merged commit 17e1dcb into hypertrace:main Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant