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

ApplicationInsights-Java agent should ignore to capture InProc span dependencies #3906

Open
n0n0213 opened this issue Oct 10, 2024 · 3 comments

Comments

@n0n0213
Copy link

n0n0213 commented Oct 10, 2024

After Java SDK version upgrading, we observed the ApplicationInsights-Java agent always capture InProc span dependencies (from CosmosDB SDK, Azure KeyVault SDK, ...) and send to Application Insights which caused the cost increasing.
Azure SDK version details:

  • ApplicationInsights-Java agent: applicationinsights-agent-3.4.17.jar
  • azure-cosmos: 4.56.0
  • azure-security-keyvault-secrets: 4.8.0
  • azure-messaging-servicebus: 7.15.1

As of now, we are using sampling rule to capture cosmos HTTP dependency and this is working fine but not work for InProc dependency.

   {
      "telemetryType": "dependency",
      "attributes": [
        {
          "key": "http.url",
          "value": "https?://[^/]+.documents.azure.com/.*",
          "matchType": "regexp"
        }
      ],
      "percentage": 10
    }

The ApplicationInsights-Java agent should ignore to capture InProc dependency as the HTTP dependency (which has more helpful information) is captured.

@n0n0213
Copy link
Author

n0n0213 commented Oct 10, 2024

Hi @trask , I have created this issue to keep track the release timeline. Thanks!

@simplyanything
Copy link

Hi @trask

Any ETA when this is implemented?

@trask
Copy link
Member

trask commented Jan 6, 2025

This is unblocked by open-telemetry/opentelemetry-java-instrumentation#12489

which will be included in this month's Application Insights Java release (we were under end of year critical change only advisory the past two months)

with open-telemetry/opentelemetry-java-instrumentation#12489, you will then be able to disable specific Azure SDK tracing programmatically using https://github.com/Azure/azure-sdk-for-java/blob/005ceb4d68849b29cd0dab5f7890c166378da500/sdk/core/azure-core/src/main/java/com/azure/core/util/TracingOptions.java#L90,

while maintaining the underlying auto-instrumentation of the HTTP client spans

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

No branches or pull requests

3 participants