-
Notifications
You must be signed in to change notification settings - Fork 180
Tracing TCP #150
Description
Background
- We are implementing tracing from the very edge of our platform.
- We support HTTP protocol as well as several TCP based protocols (e.g. SFTP, HTTP Tunneling, straight TCP streams etc).
Problem
We want to have all requests (HTTP and TCP) traced throughout our system from the edge. The TCP streams are encrypted. We cannot attach trace data to each request.
Proposal
We believe that there is value in exploring using a TCP header similar to PROXY Protocol to inject a TCP header.
The PROXY protocol provides a convenient way to safely transport connection
information such as a client's address across multiple layers of NAT or TCP
proxies. It is designed to require little changes to existing components and
to limit the performance impact caused by the processing of the transported
information.
The PROXY header is injected into the TCP packet and looks something like this
PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n
We want to propose something similar like this
TRACE b9c7c989f97918e1\r\n
We've seen other people ask if this is possible
- OpenTracing support for UDP/TCP/TLS proxy clients and servers coredns/coredns#624
- TCP Request Support in OpenTracing opentracing-java#292
I haven't seen a proposed solution yet.
Questions to address
- Is this a reasonable idea?
- Should this be proposed as a standard implementation similar to PROXY protocol?
- Does this work if we have a long-lived TCP connection?
- Does this correlate with https://www.w3.org/TR/trace-context/