|
2 | 2 | title: Troubleshoot Azure Monitor Application Insights for Java |
3 | 3 | description: This article presents troubleshooting information for the Java agent for Azure Monitor Application Insights. |
4 | 4 | ms.topic: conceptual |
5 | | -ms.date: 06/24/2024 |
| 5 | +ms.date: 01/10/2025 |
6 | 6 | editor: v-jsitser |
7 | 7 | ms.reviewer: aaronmax, jeanbisutti, trstalna, toddfous, heya, v-leedennis |
8 | 8 | ms.service: azure-monitor |
@@ -242,27 +242,28 @@ Alternatively, you can try the following experimental feature: [Startup time imp |
242 | 242 |
|
243 | 243 | ## Understand duplicated operation ID |
244 | 244 |
|
245 | | -Application logic can result in the operation ID being reused by multiple telemetry data, as shown by [this example](/azure/azure-monitor/app/distributed-trace-data#example). |
246 | | - |
247 | | -The duplication may also come from incoming requests. To spot this second possibility: |
248 | | -* Enable the capture of the `traceparent` header in the `applicationinsigths.json ` file |
249 | | -```json |
250 | | - { |
251 | | - "preview": { |
252 | | - "captureHttpServerHeaders": { |
253 | | - "requestHeaders": [ |
254 | | - "traceparent" |
255 | | - ] |
| 245 | +Application logic can result in the operation ID to be 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: |
| 246 | + |
| 247 | +* Enable the capture of the `traceparent` header in the **applicationinsigths.json** file as follows: |
| 248 | + |
| 249 | + ```json |
| 250 | + { |
| 251 | + "preview": { |
| 252 | + "captureHttpServerHeaders": { |
| 253 | + "requestHeaders": [ |
| 254 | + "traceparent" |
| 255 | + ] |
| 256 | + } |
| 257 | + } |
256 | 258 | } |
257 | | - } |
258 | | - } |
259 | | -``` |
260 | | -* Enable [self-diagnostics](/azure/azure-monitor/app/java-standalone-config#self-diagnostics) at the DEBUG level and restart the application. |
| 259 | + ``` |
| 260 | +* Enable [self-diagnostics](/azure/azure-monitor/app/java-standalone-config#self-diagnostics) at the DEBUG level and then restart the application. |
261 | 261 |
|
262 | | -In the following log example, the operation id is not populated by Application Insights but from an incoming request: |
263 | | -``` |
264 | | -{"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", ...}}}} |
265 | | -``` |
| 262 | + In the following log example, the operation ID comes from an incoming request, not Application Insights: |
| 263 | + |
| 264 | + ```output |
| 265 | + {"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", ...}}}} |
| 266 | + ``` |
266 | 267 |
|
267 | 268 | [!INCLUDE [Third-party disclaimer](../../../../includes/third-party-disclaimer.md)] |
268 | 269 |
|
|
0 commit comments