-
Notifications
You must be signed in to change notification settings - Fork 449
Description
Description of the issue:
The description of the tracing fields at https://www.elastic.co/guide/en/ecs/current/ecs-tracing.html is unclear on how they are supposed to be used.
Any additional context or examples:
The ordering of the fields on the page is alphabetical, but this presents them out of order with how they are supposed to be used.
I think the hierarchy is:
A trace contains one or more transactions, a transaction contains zero or more spans (cite for "zero or more" is https://www.elastic.co/guide/en/apm/get-started/current/transactions.html).
If this is correct then the documentation for a span, which starts "Unique identifier of the span within the scope of its trace" should probably be changed to "Unique identifier of the span within the scope of its transaction".
Linking to https://www.elastic.co/guide/en/apm/get-started/current/distributed-tracing.html from the descriptions would also be helpful.
As would an explicit description of the hierarchy in the introductory information in the page.
Uniqueness constraint is unclear
Does the "unique" in that sentence mean that span IDs should aim to be universally unique, or does it mean that a span ID only has to be unique within a single transaction, so:
trace: {id: "123"},
transaction: {id: "456"},
span: {id: "authorization"},
and
trace: {id: "123"},
transaction: {id: "789"},
span: {id: "authorization"},
would be OK (identical span IDs, but the transaction IDs are different) ?
How these work together in a tiered architecture is unclear
For example, suppose you have:
Client -> Load Balancer -> Authorization Server
`----------> Application Server -> Database 1 -> Filesystem 1
`----------> Database 2 -> Filesystem 2
-
Client makes request which terminates at the Load Balancer.
-
The Load Balancer will perform a lookup request to the authorization server, then forward the request to the application server (this is a slightly contrived example), so the load balancer has to:
a. Create a new trace id (since this is "a user request handled by multiple inter-connected services")
b. Contact the authorization server
- Create a transaction ID ("the highest level of work measured within a service, such as a request to a server")
- Create a span ID ("an operation within a transaction, such as a request to another service")
- The Authorization server receives the request.
What does it need to receive in order to effectively log an ECS event?
In particular, how do we correlate the event log the Authorization server is going to generate with the span for this request that the Load Balancer generated?
Does the span id that the Load Balancer generated become the trace id that the authorization server uses?
https://www.elastic.co/guide/en/apm/get-started/current/transaction-spans.html suggests that there are supposed to transaction.id and parent.id attributes, but they're not present in the schema.
[I'm generating doing this in Rust, for which there isn't an APM agent yet, I want my app to emit logs that can be seamlessly ingested in to Elastic with tracing support]