class RateLimitingPreExecutionInterceptor extends PreExecutionSpanInterceptor {

	@Override
	public void interceptReport(PreExecutionInterceptorContext context) {
		if (rateLimiter == null) {
			return;
		}
		// the rate limit is per span but we either sample a trace as a whole or don't sample it
		// even though we don't make sampling decisions for non root spans
		// we need to tell the rate limiter that there is another span being sampled
		// so that the cost is incorporated
		if (isRateExceeded(rateLimiter) && isRoot(context.getSpanContext().getSpanWrapper())) {
			context.shouldNotReport(getClass());
		}
	}

}