-
Notifications
You must be signed in to change notification settings - Fork 205
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
Using Java Agent with AI SDK #1743
Comments
I tried to convert as much code to configuration (span processors) as I could, but again I encountered problems:
Any help would be appreciated. |
hey @wcislo! I'm having a hard time following exactly what's working and what's not for you. Would it be possible for you to create a small repro to demonstrate? I think that would help us to guide you to a solution. |
With pure SDK v2.6.3: This code works, name is modified and visible in Azure Portal
This works perfectly fine with SDK + Java Agent, but the thing is that I can't find a way to correlate it with auto-collected telemetry, so it gets duplicated (I can see same remote dependency request twice, mine and auto-collected). I want to find a way to either correlate them, or disable auto-collected remote dependencies, or modify auto-collected telemetry with custom attribute. What we want
where custom property must be set dynamically. I think it should be possible to achieve through telemetry processors e.g.:
above example works, but there are two problems:
|
What we have:
Right now we are using AI SDK v 2.6.3 for tracking HTTP operations and remote dependencies. We use it in multi-tenant system, and it is important for us to incorporate additional information about tenant (which is passed via request headers) in our telemetry data.
What we achive is visible distinction between requests for tenants, and ability to filter telemetry for them.
RemoteDependencyTelemetry
andTelemetryClient
. We are able to produce names with tenant information, full URL, time measurments and it basically works perfectly fineWhat we want to achieve:
We want to keep all of above functionalities, but also have automatic telemetry collected for JMS, Redis, Postgresql etc. so we tried to use SKD with Java Agent v 3.1.0
Problems:
getRequestTelemetryContext()
always returns another instance,HttpRequestTelemetry
is not populated and code is not having any effect on collected telemetry data. When debugging, invokingrequestTelemetry.getName()
after filterChain returns desired name.In short:
Basically what we want is to preserve HTTP telemetry names in form:
<tenant_name> <http_method> <endpoint/url>
e.g.: Tenant_123 GET /api/v1/get-tenant-info/{tenant_id}
and what we have is:
GET /api/v1/get-tenant-info/{tenant_id} - for incoming requests
HTTP GET - for outgoing request (+ duplicated manual telemetry)
We use:
Spring 4.3.30, applicationinsights-web 2.6.3, Application Insights Java Agent 3.1.0
Thanks in advance for any suggestions.
The text was updated successfully, but these errors were encountered: