The Wayback Machine - https://web.archive.org/web/20200911045803/https://github.com/microsoft/ApplicationInsights-Java/issues/1294
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

Dependencies Disabling #1294

Open
martupeppe opened this issue Jul 29, 2020 · 7 comments
Open

Dependencies Disabling #1294

martupeppe opened this issue Jul 29, 2020 · 7 comments

Comments

@martupeppe
Copy link

@martupeppe martupeppe commented Jul 29, 2020

Hi,
I just configured my Java application on-prem installing the Java Codeless Agent applicationinsights-agent-3.0.0-PREVIEW.5.jar.

I figured out my application is logging milions of dependencies and I would like to disable them, but I think there is no way to disable only dependencies because as far as I understood the dependencies are auto-tracked.

I would like to have a dedicated configuration to avoid to send dependencies to Application Insights.

Thanks,
Giuseppe

@MS-jgol
Copy link
Collaborator

@MS-jgol MS-jgol commented Jul 30, 2020

@martupeppe
Here are the configuration options we have available for Java agent:
https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-standalone-config

What dependencies are excessive? You may greatly benefit from enabling sampling.

@martupeppe
Copy link
Author

@martupeppe martupeppe commented Jul 30, 2020

Hi,
Thanks for the Answer I knew that link and it seems there is no way to limit the jdbc dependencies which are causing cost issues.

Thanks

@MS-jgol
Copy link
Collaborator

@MS-jgol MS-jgol commented Jul 30, 2020

@martupeppe Do you think sampling may work for you?

@martupeppe
Copy link
Author

@martupeppe martupeppe commented Jul 30, 2020

No I don't think so. The customer would like to have all the requests.

Another solution would be avoid to send requests from a specific operationname so that the related dependencies would be filtered out.

Any suggestion?

Giuseppe

@martupeppe
Copy link
Author

@martupeppe martupeppe commented Aug 1, 2020

@MS-jgol any suggestion?

@martupeppe
Copy link
Author

@martupeppe martupeppe commented Aug 9, 2020

@MS-jgol no ideas? Should I switch to java sdk to disable dependencies?

@martupeppe
Copy link
Author

@martupeppe martupeppe commented Aug 19, 2020

@MS-jgol looking at the code I think it should be fine amending te BeforeAgentInstaller.java to read the configuration e set a Global Property. In order to avoid to send dependency telemetry, the ByteCodeUtilImpl.java file should be changed and specifically the method trackDependency should evaluate the Global property previously set and log only if the configuration has been enabled. The same mechanism is used for Sampling just to mange the sampling percentage. Do you think it is feasible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.