Package com.helixframework.tracing.http
Class HttpHeaderHelixCorrelationId
java.lang.Object
com.helixframework.tracing.http.HttpHeaderHelixCorrelationId
- All Implemented Interfaces:
com.helixframework.tracing.HelixCorrelationId
public class HttpHeaderHelixCorrelationId
extends Object
implements com.helixframework.tracing.HelixCorrelationId
Implementation of
HelixCorrelationId that retrieves correlation identifiers
(trace id and span id) from HTTP headers in a provided HttpServletRequest instance.
This class requires the names of the HTTP headers that contain the trace id and span id, as well
as the HttpServletRequest instance to extract these values. It provides methods to access the
trace id and span id header values using the traceId() and spanId() methods,
respectively.-
Constructor Summary
ConstructorsConstructorDescriptionHttpHeaderHelixCorrelationId(String traceIdHeaderName, String spanIdHeaderName, jakarta.servlet.http.HttpServletRequest httpRequest) Constructs an instance ofHttpHeaderHelixCorrelationIdthat retrieves trace id and span id from specified HTTP headers in the providedHttpServletRequest. -
Method Summary
-
Constructor Details
-
HttpHeaderHelixCorrelationId
public HttpHeaderHelixCorrelationId(String traceIdHeaderName, String spanIdHeaderName, jakarta.servlet.http.HttpServletRequest httpRequest) Constructs an instance ofHttpHeaderHelixCorrelationIdthat retrieves trace id and span id from specified HTTP headers in the providedHttpServletRequest.- Parameters:
traceIdHeaderName- The name of the HTTP header containing the trace id.spanIdHeaderName- The name of the HTTP header containing the span id.httpRequest- TheHttpServletRequestfrom which the headers will be read.
-
-
Method Details
-
traceId
- Specified by:
traceIdin interfacecom.helixframework.tracing.HelixCorrelationId
-
spanId
- Specified by:
spanIdin interfacecom.helixframework.tracing.HelixCorrelationId
-