test_class.declarator: interceptor
test_class.modifier: private
test_class.original_string: private ProbabilisticSamplingPreExecutionInterceptor interceptor;
test_class.type: ProbabilisticSamplingPreExecutionInterceptor
test_class.var_name: interceptor
test_class.declarator: tracingPlugin
test_class.modifier: private
test_class.original_string: private TracingPlugin tracingPlugin;
test_class.type: TracingPlugin
test_class.var_name: tracingPlugin
test_class.declarator: context
test_class.modifier: private
test_class.original_string: private PreExecutionInterceptorContext context;
test_class.type: PreExecutionInterceptorContext
test_class.var_name: context
test_class.declarator: spanContext
test_class.modifier: private
test_class.original_string: private SpanContextInformation spanContext;
test_class.type: SpanContextInformation
test_class.var_name: spanContext
test_class.declarator: configuration
test_class.modifier: private
test_class.original_string: private ConfigurationRegistry configuration;
test_class.type: ConfigurationRegistry
test_class.var_name: configuration
test_class.file: stagemonitor-tracing/src/test/java/org/stagemonitor/tracing/sampling/ProbabilisticSamplingPreExecutionInterceptorTest.java
test_class.identifier: ProbabilisticSamplingPreExecutionInterceptorTest
test_case.body: @Test
  	public void testNeverReportSpan() throws Exception {
  		tracingPlugin.getDefaultRateLimitSpansPercentOption().update(0d, SimpleSource.NAME);
  
  		interceptor.interceptReport(context);
  		assertFalse(context.isReport());
  		interceptor.interceptReport(context);
  		assertFalse(context.isReport());
  	}
test_case.class_method_signature: ProbabilisticSamplingPreExecutionInterceptorTest.testNeverReportSpan()
test_case.full_signature: @Test public void testNeverReportSpan()
test_case.identifier: testNeverReportSpan
test_case.invocations: update getDefaultRateLimitSpansPercentOption interceptReport assertFalse isReport interceptReport assertFalse isReport
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNeverReportSpan()
focal_class.declarator: BIT_SET_SIZE = 100
focal_class.modifier: private static final
focal_class.original_string: private static final int BIT_SET_SIZE = 100;
focal_class.type: int
focal_class.var_name: BIT_SET_SIZE
focal_class.declarator: defaultSampleDecisions
focal_class.modifier: private
focal_class.original_string: private BitSet defaultSampleDecisions;
focal_class.type: BitSet
focal_class.var_name: defaultSampleDecisions
focal_class.declarator: sampleDecisionsByType
focal_class.modifier: private
focal_class.original_string: private Map<String, BitSet> sampleDecisionsByType;
focal_class.type: Map<String, BitSet>
focal_class.var_name: sampleDecisionsByType
focal_class.declarator: spanCounter = new AtomicInteger()
focal_class.modifier: private
focal_class.original_string: private AtomicInteger spanCounter = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: spanCounter
focal_class.declarator: tracingPlugin
focal_class.modifier: private
focal_class.original_string: private TracingPlugin tracingPlugin;
focal_class.type: TracingPlugin
focal_class.var_name: tracingPlugin
focal_class.file: stagemonitor-tracing/src/main/java/org/stagemonitor/tracing/sampling/ProbabilisticSamplingPreExecutionInterceptor.java
focal_class.identifier: ProbabilisticSamplingPreExecutionInterceptor
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.init(ConfigurationRegistry configuration)
focal_class.full_signature: @Override public void init(ConfigurationRegistry configuration)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (ConfigurationRegistry configuration)
focal_class.return: void
focal_class.signature: void init(ConfigurationRegistry configuration)
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.handleRuntimeConfigChanges(TracingPlugin tracingPlugin)
focal_class.full_signature: private void handleRuntimeConfigChanges(TracingPlugin tracingPlugin)
focal_class.identifier: handleRuntimeConfigChanges
focal_class.modifiers: private
focal_class.parameters: (TracingPlugin tracingPlugin)
focal_class.return: void
focal_class.signature: void handleRuntimeConfigChanges(TracingPlugin tracingPlugin)
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.interceptReport(PreExecutionInterceptorContext context)
focal_class.full_signature: @Override public void interceptReport(PreExecutionInterceptorContext context)
focal_class.identifier: interceptReport
focal_class.modifiers: @Override public
focal_class.parameters: (PreExecutionInterceptorContext context)
focal_class.return: void
focal_class.signature: void interceptReport(PreExecutionInterceptorContext context)
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.isRoot(SpanWrapper span)
focal_class.full_signature: protected boolean isRoot(SpanWrapper span)
focal_class.identifier: isRoot
focal_class.modifiers: protected
focal_class.parameters: (SpanWrapper span)
focal_class.return: boolean
focal_class.signature: boolean isRoot(SpanWrapper span)
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.isSampled(BitSet sampleDecisions, AtomicInteger spanCounter)
focal_class.full_signature: private boolean isSampled(BitSet sampleDecisions, AtomicInteger spanCounter)
focal_class.identifier: isSampled
focal_class.modifiers: private
focal_class.parameters: (BitSet sampleDecisions, AtomicInteger spanCounter)
focal_class.return: boolean
focal_class.signature: boolean isSampled(BitSet sampleDecisions, AtomicInteger spanCounter)
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.setBitSetMap(Map<String, Double> newValue)
focal_class.full_signature: private void setBitSetMap(Map<String, Double> newValue)
focal_class.identifier: setBitSetMap
focal_class.modifiers: private
focal_class.parameters: (Map<String, Double> newValue)
focal_class.return: void
focal_class.signature: void setBitSetMap(Map<String, Double> newValue)
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.getBitSet(double probability)
focal_class.full_signature: private BitSet getBitSet(double probability)
focal_class.identifier: getBitSet
focal_class.modifiers: private
focal_class.parameters: (double probability)
focal_class.return: BitSet
focal_class.signature: BitSet getBitSet(double probability)
focal_class.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.randomBitSet(int size, int cardinality, Random rnd)
focal_class.full_signature: private static BitSet randomBitSet(int size, int cardinality, Random rnd)
focal_class.identifier: randomBitSet
focal_class.modifiers: private static
focal_class.parameters: (int size, int cardinality, Random rnd)
focal_class.return: BitSet
focal_class.signature: BitSet randomBitSet(int size, int cardinality, Random rnd)
focal_class.superclass: extends PreExecutionSpanInterceptor
focal_method.body: @Override
  	public void interceptReport(PreExecutionInterceptorContext context) {
  		final SpanContextInformation spanContext = context.getSpanContext();
  		final BitSet sampleDecisions;
  		final String operationType = spanContext.getOperationType();
  		if (sampleDecisionsByType.containsKey(operationType)) {
  			sampleDecisions = sampleDecisionsByType.get(operationType);
  		} else if (isRoot(context.getSpanContext().getSpanWrapper())) {
  			sampleDecisions = defaultSampleDecisions;
  		} else {
  			return;
  		}
  		if (sampleDecisions != null && !isSampled(sampleDecisions, spanCounter)) {
  			context.shouldNotReport(getClass());
  		}
  	}
focal_method.class_method_signature: ProbabilisticSamplingPreExecutionInterceptor.interceptReport(PreExecutionInterceptorContext context)
focal_method.full_signature: @Override public void interceptReport(PreExecutionInterceptorContext context)
focal_method.identifier: interceptReport
focal_method.invocations: getSpanContext getOperationType containsKey get isRoot getSpanWrapper getSpanContext isSampled shouldNotReport getClass
focal_method.modifiers: @Override public
focal_method.parameters: (PreExecutionInterceptorContext context)
focal_method.return: void
focal_method.signature: void interceptReport(PreExecutionInterceptorContext context)