Skip to content

Commit 4ca0e46

Browse files
authored
Merge pull request #7979 from jeanbisutti/operation-id
AB#3317: Duplicated operation id
2 parents 7a86950 + 2fe9aa8 commit 4ca0e46

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

support/azure/azure-monitor/app-insights/telemetry/java-standalone-troubleshoot.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Troubleshoot Azure Monitor Application Insights for Java
33
description: This article presents troubleshooting information for the Java agent for Azure Monitor Application Insights.
44
ms.topic: conceptual
5-
ms.date: 11/06/2024
5+
ms.date: 01/10/2025
66
editor: v-jsitser
77
ms.reviewer: aaronmax, jeanbisutti, trstalna, toddfous, heya, v-leedennis
88
ms.service: azure-monitor
@@ -253,6 +253,32 @@ You can also try the [monitoring solutions for Java native](/azure/azure-monitor
253253
- With Spring Boot, the Microsoft distribution of the OpenTelemetry starter.
254254
- With Quarkus, the Quarkus Opentelemetry Exporter for Microsoft Azure.
255255

256+
257+
## Understand duplicated operation IDs
258+
259+
Application logic can result in an operation ID being reused by multiple telemetry items, as shown in [this example](/azure/azure-monitor/app/distributed-trace-data#example). The duplication might also come from incoming requests. To identify this, use one of the following methods:
260+
261+
* Enable the capture of the `traceparent` header in the **applicationinsigths.json** file as follows:
262+
263+
```json
264+
{
265+
"preview": {
266+
"captureHttpServerHeaders": {
267+
"requestHeaders": [
268+
"traceparent"
269+
]
270+
}
271+
}
272+
}
273+
```
274+
* Enable [self-diagnostics](/azure/azure-monitor/app/java-standalone-config#self-diagnostics) at the DEBUG level and restart the application.
275+
276+
In the following log example, the operation ID comes from an incoming request, not Application Insights:
277+
278+
```output
279+
{"ver":1,"name":"Request",...,"ai.operation.id":"4e757357805f4eb18705abd24326b550)","ai.operation.parentId":"973487efc3db7d03"},"data":{"baseType":"RequestData","baseData":{...,"properties":{"http.request.header.traceparent":"00-4e757357805f4eb18705abd24326b550-973487efc3db7d03-01", ...}}}}
280+
```
281+
256282
[!INCLUDE [Third-party disclaimer](../../../../includes/third-party-disclaimer.md)]
257283

258284
[!INCLUDE [Azure Help Support](../../../../includes/azure-help-support.md)]

0 commit comments

Comments
 (0)