Class SimpleTraceContext

java.lang.Object
io.micrometer.tracing.test.simple.SimpleTraceContext
All Implemented Interfaces:
io.micrometer.tracing.TraceContext

public class SimpleTraceContext extends Object implements io.micrometer.tracing.TraceContext
A test implementation of a trace context.
Since:
1.0.0
  • Constructor Details

    • SimpleTraceContext

      public SimpleTraceContext()
  • Method Details

    • traceId

      public String traceId()
      Specified by:
      traceId in interface io.micrometer.tracing.TraceContext
    • parentId

      public String parentId()
      Specified by:
      parentId in interface io.micrometer.tracing.TraceContext
    • spanId

      public String spanId()
      Specified by:
      spanId in interface io.micrometer.tracing.TraceContext
    • sampled

      public Boolean sampled()
      Specified by:
      sampled in interface io.micrometer.tracing.TraceContext
    • setTraceId

      public void setTraceId(String traceId)
      Sets the trace id.
      Parameters:
      traceId - trace id
    • setParentId

      public void setParentId(String parentId)
      Sets the parent span id.
      Parameters:
      parentId - parent span id
    • setSpanId

      public void setSpanId(String spanId)
      Sets the span id.
      Parameters:
      spanId - span id
    • setSampled

      public void setSampled(Boolean sampled)
      Sets the sampling decision.
      Parameters:
      sampled - sampled, or not?
    • toString

      public String toString()
      Overrides:
      toString in class Object