Consider adding a router configuration option to reject requests without tracing data
- Dominant language
- Scala
- Stars
- 5.3k
- Forks
- 494
- PR merge metrics
- No merged PRs in 30d
Description
This suggestion came up in conversation with @harryzoomed. Right now when linkerd receives an http request that does not include a trace id, it initializes a new trace for the request:
https://github.com/BuoyantIO/linkerd/blob/master/linkerd/protocol/http/src/main/scala/com/twitter/finagle/buoyant/linkerd/HttpTraceInitializer.scala#L28
That is the correct behavior for when a request first enters the system. For additional downstream requests, however, we expect requests to already have their trace id set, and not having a trace id might be an indication that the request was mishandled by an upstream service. In that case, it could be helpful to expose a router configuration option, such that we could configure an internal router to reject requests that are missing their tracing data.
Contributor guide
Research direction
Start with linkerd/protocol/http/src/main/scala/com/twitter/finagle/buoyant/linkerd/HttpTraceInitializer.scala at line 28 to understand how missing trace IDs are handled. Trace where router configuration is defined and determine how an option could reject requests without tracing data. Done means an internal router can be configured to reject such requests while requests entering the system can still initialize a trace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100