microsoftgraph/msgraph-sdk-java

How to avoid Application Insights to be spamed since 6.x.x SDK

Closed this issue · 4 comments

With Graph SDK 6.13.0 my App-Insights get filled very soon. Each Request logs about 10 InProcs.
How can i disable this?

image

Hi @dwlabcube
Thanks for using the Microsoft Graph SDK and for reaching out.
I'm going to assume that you're using the Open Telemetry SDK and have set up application insights as an exporter similarly to this documentation
Since the exclusion capability does not seem possible out of the box with this exporter, it seems that you'll have to build a custom one.
I could only find a python example of doing so
All trace instrumentation names start with com.microsoft.kiota

Let us know if you have additional questions!

Actually i am using the Java-Agent not an exporter.
Some things there can be set via Env-Vars, but unluckily the .._AZURE_SDK_ENABLED being set to false did not solve the issue.

image

i thought there might be another env-var to be set.

the spans get set up in kiota here:
https://github.com/microsoft/kiota-java/blob/6f9a3219a543fe30525931339e33bd8ad27ae2f3/components/http/okHttp/src/main/java/com/microsoft/kiota/http/OkHttpRequestAdapter.java#L773

maybe i have to move this issue to the kiota-java repo?

yes, it'd make more sense to move this issue to that repository since no telemetry instrumentation is present at this layer.

i opened a corresponding ticket
microsoft/kiota-java#1446