We want to support automatic telemetry correlation across components (e.g. services) in a composite application running Java.
Proposed Solution
We propose to design and implement a similar solution to what is available in other SDK’s, making use of fields in the telemetry data model and HTTP headers to propagate correlation ID’s among the different layers and components.
For .NET, issue was discussed here: microsoft/ApplicationInsights-dotnet#47
HTTP Headers
X-ms-request-id: the ID of the parent telemetry
X-ms-request-root-id: the ID of the logical operation
Request-Id: if present, supersedes the above 2 headers.
Correlation-Context: if exists, the key-value pairs here go into custom properties for the request telemetry.
Telemetry Fields
Id: unique identifier for each request and dependency telemetry item.
OperationId: identifier for the logical operation. Value needs to be set from Request-Id or x-ms-request-root-id
ParentId: identifies telemetry that generated the current sub-operation. In case of dependency telemetry, the parent is the request that originated it (within the same service/component). In case of request telemetry, the parent is the dependency that triggered the request. In this case, the dependency belongs to a client component and, therefore, the value needs to be set from the x-ms-request-id header (Request-Id if present)
We want to support automatic telemetry correlation across components (e.g. services) in a composite application running Java.
Proposed Solution
We propose to design and implement a similar solution to what is available in other SDK’s, making use of fields in the telemetry data model and HTTP headers to propagate correlation ID’s among the different layers and components.
For .NET, issue was discussed here: microsoft/ApplicationInsights-dotnet#47
HTTP Headers
X-ms-request-id: the ID of the parent telemetry
X-ms-request-root-id: the ID of the logical operation
Request-Id: if present, supersedes the above 2 headers.
Correlation-Context: if exists, the key-value pairs here go into custom properties for the request telemetry.
Telemetry Fields
Id: unique identifier for each request and dependency telemetry item.
OperationId: identifier for the logical operation. Value needs to be set from Request-Id or x-ms-request-root-id
ParentId: identifies telemetry that generated the current sub-operation. In case of dependency telemetry, the parent is the request that originated it (within the same service/component). In case of request telemetry, the parent is the dependency that triggered the request. In this case, the dependency belongs to a client component and, therefore, the value needs to be set from the x-ms-request-id header (Request-Id if present)