w3c / w3c/trace-context

Proposal: Add a "propagation-only-parent" flag to be set to true if parents is a no-tracing service

Open
#550 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

trace-context-level-3
Dominant language
Python
Stars
510
Forks
80
PR merge metrics
No merged PRs in 30d

Description

Background

Starting from the definition about the "minimum" interaction:

At a minimum they MUST propagate the traceparent and tracestate headers and guarantee traces are not broken. This behavior is also referred to as forwarding a trace.

Let's assume we have the following scenario, where 3 services are call during a request A -> B -> C (Service A calls Service B which calls Service C), and assume that the owner of the Service B wants tracing disable so they will do the "minimum" interaction defined above. With this it will look like Service A -> Service C (service A calls Service C, which is not really the reality).

Proposal

Add some information into the trace-flags about the fact that the request recently passed a Service that has not participated in the trace. For this we can define a "propagation-only-parent" flag bit, that has the following behavior:

  • If a Service was doing the minimum propagation only before, they will set this bit to 1 when they send the header to the next service to signal that the parent was a propagation only.
  • If a Service participates into the trace they will set this bit to 0 to signal that the parent is not a propagation only.
How does this help?

Knowing that the parent participates or not into the trace is a critical information that can be used by the backend when showing parent child relationships and to inform the user about the correct connection between the services. In this case what the backend may do is just to inform the user that there are intermediate services that are not participating in the trace (backend cannot know about how many, what other services are doing since they decided to not participate in the trace).

Questions

  • Do we need an extra bit to represent if the "propagation-only-parent" bit is set or not?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked W3C Trace Context design overview and the proposed trace-flags behavior for propagation-only parents. Review how traceparent, tracestate, and the existing trace-flags are described in this issue, then determine whether an additional presence bit is needed and document the resulting behavior for participating and propagation-only services.

Written by the indexing model from the issue text.

Assessment

Domain
distributed-systems, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.