Trace

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Trace(val name: String = "", val metadataCustomizer: KClass<out SpanMetadataCustomizer> = DefaultSpanMetadataCustomizer::class)(source)

Annotates a function to automatically generate a tracing span on each invocation.

Properties

Link copied to clipboard

A KClass of a SpanMetadataCustomizer to customize span names and attributes. Must be a Kotlin object. Defaults to DefaultSpanMetadataCustomizer.

Link copied to clipboard

The name of the span. If left empty, a default name is derived from the function name.