RequestTraceId
A small plug similar to Plug.RequestId except that it appends ids allowing for simple request tracing. Because of this distinction the header used is instead X-Request-Trace-Id and the following terminology is adopted (adapted from Zipkin):
span-id
- A randomized id generated for each client/server request/response.
request-trace-id
- A semicolon delimited string of all span-ids generated during the lifecycle of a single upstream request.
Installation
If available in Hex, the package can be installed
by adding request_trace_id to your list of dependencies in mix.exs:
def deps do
[
{:request_trace_id, "~> 0.1.0"}
]
endUsage
To use it, just plug it into the desired module:
plug RequestTraceIdDocs
See: https://hexdocs.pm/request_trace_id/RequestTraceId.html