Class BraveSamplerFunction<T>

java.lang.Object
org.springframework.cloud.sleuth.brave.bridge.BraveSamplerFunction<T>
Type Parameters:
T - type of the input, for example a request or method
All Implemented Interfaces:
org.springframework.cloud.sleuth.SamplerFunction<T>

public final class BraveSamplerFunction<T> extends Object implements org.springframework.cloud.sleuth.SamplerFunction<T>
Brave implementation of a SamplerFunction.
Since:
3.0.0
Author:
Marcin Grzejszczak
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.springframework.cloud.sleuth.SamplerFunction

    org.springframework.cloud.sleuth.SamplerFunction.Constants
  • Constructor Summary

    Constructors
    Constructor
    Description
    BraveSamplerFunction(brave.sampler.SamplerFunction<T> samplerFunction)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static brave.sampler.SamplerFunction<brave.http.HttpRequest>
    toHttpBrave(org.springframework.cloud.sleuth.SamplerFunction<org.springframework.cloud.sleuth.http.HttpRequest> samplerFunction)
     
    trySample(T arg)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BraveSamplerFunction

      public BraveSamplerFunction(brave.sampler.SamplerFunction<T> samplerFunction)
  • Method Details

    • trySample

      public Boolean trySample(T arg)
      Specified by:
      trySample in interface org.springframework.cloud.sleuth.SamplerFunction<T>
    • toHttpBrave

      public static brave.sampler.SamplerFunction<brave.http.HttpRequest> toHttpBrave(org.springframework.cloud.sleuth.SamplerFunction<org.springframework.cloud.sleuth.http.HttpRequest> samplerFunction)