Skip to content

Commit 4a0cc42

Browse files
authored
Duplicated operation id
1 parent 30d8d1b commit 4a0cc42

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,31 @@ Java 8 has a known issue that's related to the JAR file signature verification o
239239

240240
Alternatively, you can try the following experimental feature: [Startup time improvement for a limited number of CPU cores](https://github.com/microsoft/ApplicationInsights-Java/wiki/Start-up-time-improvement-with-a-limited-number-of-CPU-cores-(experimental)). If you experience any issues while using this feature, send us feedback.
241241

242+
243+
## Understand duplicated operation ID
244+
245+
The 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 trace parent headers in the `applicationinsigths.json ` file
249+
```json
250+
{
251+
"preview": {
252+
"captureHttpServerHeaders": {
253+
"requestHeaders": [
254+
"traceparent"
255+
]
256+
}
257+
}
258+
}
259+
```
260+
* Enable the [self-diagnostics](/azure/azure-monitor/app/java-standalone-config#self-diagnostics) at the DEBUG level and restart the application.
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+
```
266+
242267
[!INCLUDE [Third-party disclaimer](../../../../includes/third-party-disclaimer.md)]
243268

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

0 commit comments

Comments
 (0)