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

Suppress duplicate AI agents #1434

Merged
merged 3 commits into from
Jan 12, 2021
Merged

Suppress duplicate AI agents #1434

merged 3 commits into from
Jan 12, 2021

Conversation

trask
Copy link
Member

@trask trask commented Jan 10, 2021

This PR makes sure that, as long as the 3.0.0 java agent is the first -javaagent on the command line, that it will suppress other Application Insights java agents.

This is primarily helpful for App Services attach, where we use JAVA_TOOL_OPTIONS (which is prepended to the command line args).

This also resolves #1345 😄 (https://stackoverflow.com/questions/60838748/intellij-idea-java-instrumentation-premain-gets-called-twice-when-directly-run).

Copy link
Contributor

@heyams heyams left a comment

Choose a reason for hiding this comment

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

is it possible to add a test for detecting duplicate agents?

@trask
Copy link
Member Author

trask commented Jan 12, 2021

is it possible to add a test for detecting duplicate agents?

ya, you're right, this is important, I added a backlog item to add test: https://msazure.visualstudio.com/One/_workitems/edit/9112258

@trask trask merged commit 9b2bb24 into master Jan 12, 2021
@trask trask deleted the trask/suppress-duplicate-agent branch January 12, 2021 23:41
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.

Duplicated log events in AppInsights dashboard
3 participants