Skip to content

Suppress duplicate AI agents#1434

Merged
trask merged 3 commits into
masterfrom
trask/suppress-duplicate-agent
Jan 12, 2021
Merged

Suppress duplicate AI agents#1434
trask merged 3 commits into
masterfrom
trask/suppress-duplicate-agent

Conversation

@trask

@trask trask commented Jan 10, 2021

Copy link
Copy Markdown
Member

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).

@heyams heyams left a comment

Copy link
Copy Markdown
Contributor

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

trask commented Jan 12, 2021

Copy link
Copy Markdown
Member Author

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