com.github.kristofa.brave.CommonSpanState Maven / Gradle / Ivy
package com.github.kristofa.brave;
import com.twitter.zipkin.gen.Endpoint;
/**
* Keeps track of common trace/span state information.
*
* Should be thread aware since we can have multiple parallel request which means multiple trace/spans.
*
*
* @author kristof
*/
public interface CommonSpanState {
/**
* Indicates if we should sample current request.
*
* Should be thread-aware to support multiple parallel requests.
*
* @return null
in case there is no indication if we should sample or not. true
in case we got
* the indication we should sample current request, false
in case we should not sample the current
* request.
*/
Boolean sample();
/**
* Gets the Endpoint (ip, port, service name) for this service.
*
* @return Endpoint for this service.
*/
Endpoint endpoint();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy