-
public final class FeatureScopeExtKt
-
-
Method Summary
Modifier and Type Method Description final static <R extends Any> RmeasureMethodCallPerf(InternalLogger $self, Class<?> callerClass, String operationName, Float samplingRate, Function0<R> operation)Measures the execution time for the given block and report it as a MethodCall telemetry metric. final static Future<DatadogContext>getContextFuture(FeatureScope $self, Set<String> withFeatureContexts)Utility to read current DatadogContext, asynchronously. -
-
Method Detail
-
measureMethodCallPerf
final static <R extends Any> R measureMethodCallPerf(InternalLogger $self, Class<?> callerClass, String operationName, Float samplingRate, Function0<R> operation)
Measures the execution time for the given block and report it as a MethodCall telemetry metric.
- Parameters:
callerClass- the class calling the measured methodoperationName- the operationName to report in the metricsamplingRate- the sampling rate for the metricoperation- the operation to report
-
getContextFuture
@AnyThread() final static Future<DatadogContext> getContextFuture(FeatureScope $self, Set<String> withFeatureContexts)
Utility to read current DatadogContext, asynchronously.
- Parameters:
withFeatureContexts- Feature contexts (DatadogContext.featuresContext property) to include in the DatadogContext provided.
-
-
-
-