Tabnine Logo
RootSpanSamplingStrategy
Code IndexAdd Tabnine to your IDE (free)

How to use
RootSpanSamplingStrategy
in
com.nike.wingtips.sampling

Best Java code snippets using com.nike.wingtips.sampling.RootSpanSamplingStrategy (Showing top 2 results out of 315)

origin: Nike-Inc/wingtips

/**
 * Delegates to {@link #rootSpanSamplingStrategy}'s {@link RootSpanSamplingStrategy#isNextRootSpanSampleable()} method to determine whether the next root span should be
 * sampled.
 * <br/>
 * NOTE: This method is not deterministic - you may get a different response every time you call it. Therefore you should not call this method multiple times for the same
 * root span. Call it once and store the result for a given root span.
 *
 * @return true when the next root span should be sampled, false otherwise.
 */
protected boolean isNextRootSpanSampleable() {
  return rootSpanSamplingStrategy.isNextRootSpanSampleable();
}
origin: Nike-Inc/wingtips

@Test
public void isNextRootSpanSampleable_should_use_strategy() {
  // given: known sampling strategy that is set on the Tracer
  RootSpanSamplingStrategy mockStrategy = mock(RootSpanSamplingStrategy.class);
  Tracer.getInstance().setRootSpanSamplingStrategy(mockStrategy);
  // when: isNextRootSpanSampleable() is called
  Tracer.getInstance().isNextRootSpanSampleable();
  // then: the strategy's isNextRootSpanSampleable() method should have been called
  verify(mockStrategy).isNextRootSpanSampleable();
}
com.nike.wingtips.samplingRootSpanSamplingStrategy

Javadoc

Pluggable strategy for com.nike.wingtips.Tracer that determines whether or not the next root span should be sampled (i.e. request span that has no parent and is not explicitly requested to be sampled or ignored). Call com.nike.wingtips.Tracer#setRootSpanSamplingStrategy(RootSpanSamplingStrategy) to tell the tracer to use a specific strategy.

Most used methods

  • isNextRootSpanSampleable

Popular in Java

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Reference (javax.naming)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now