azure-docs
azure-docs copied to clipboard
Clarification Needed: Globally Unique ID Requirements and W3C TraceContext parent-id Mapping in Distributed Tracing Documentation
I'm seeking clarification on the apparent discrepancies regarding the ID size and uniqueness requirements for distributed trace-related telemetry items, as well as their mapping to the W3C TraceContext standards. This is highlighted in the following document sections:
Data model for telemetry correlation
...
A distributed logical operation typically consists of a set of smaller operations that are requests processed by one of the components. Request telemetry defines these operations. Every request telemetry item has its own id that identifies it uniquely and globally. And all telemetry items (such as traces and exceptions) that are associated with the request should set the operation_parentId to the value of the request id.
Dependency telemetry represents every outgoing operation, such as an HTTP call to another component. It also defines its own id that's globally unique. Request telemetry, initiated by this dependency call, uses this id as its operation_parentId.
You can build a view of the distributed logical operation by using operation_Id, operation_parentId, and request.id with dependency.id. These fields also define the causality order of telemetry calls.
Noting the specifically called out globally unique requirement for all distributed trace related telemetry items (i.e. Request
and Dependency
, but technically should also include PageView
too). This is achieved using GUIDs with these ID
fields being 16 bytes.
Example
...
itemType name ID operation_ParentId operation_Id pageView Stock page STYz
STYz
dependency GET /Home/Stock qJSXU
STYz
STYz
request GET Home/Stock KqKwlrSt9PA=
qJSXU
STYz
dependency GET /api/stock/value bBrf2L7mm2g=
KqKwlrSt9PA=
STYz
The example table is nice and clear in how then mapping occurs, but uses very short ID
fields (which may just be for ease of reading) which I doubt those 4
and 12
byte IDs are globally unique.
Correlation headers using W3C TraceContext
...
Application Insights W3C TraceContext > Id
ofRequest
andDependency
parent-id Operation_Id
trace-id Operation_ParentId
parent-id of this span's parent span. This field must be empty if it's a root span.
Finally, the mapping of Request
and Dependency
Id
fields to the parent-id
field of the W3C TraceContext. The parent-id
field is only 8
bytes. How can I fit a 16
byte guid into a 8
byte parent-id ?
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 83691d46-7bf3-8081-1a60-55afcbb984c7
- Version Independent ID: 4b4bb2bc-395b-8adf-f670-cf9894f0610f
- Content: Distributed tracing and telemetry correlation in Azure Application Insights - Azure Monitor
- Content Source: articles/azure-monitor/app/distributed-trace-data.md
- Service: azure-monitor
- Sub-service: application-insights
- GitHub Login: @AaronMaxwell
- Microsoft Alias: aaronmax
@AdamCoulterOz Thanks for your feedback! We will investigate and update as appropriate.
Thank you for reaching out to us! We appreciate your interest in improving our documentation.
The feedback channel on GitHub is designed for updating documentation with known information, and we will not be able to provide a timely response to your question here. Please also note that GitHub issues are being phased out completely. For more information see: https://aka.ms/ContentUserFeedback.
The best way to get answers to your questions is to create a support ticket. Our support team is available to assist you with any questions or issues you may have. You can create a support ticket by visiting the following link: https://azure.microsoft.com/support/create-ticket/
Once you have received assistance from our support team, we would be happy to document the answer to your questions in the appropriate articles for future reference. #please-close