SpanMetadataCustomizer

Customizes span names and attributes (input arguments and outputs) for instrumented method calls.

Implementations must be Kotlin object declarations — classes are not supported.

Use this interface to:

All methods are optional to override and each has a default implementation, so you only need to override what you want to customize:

object MyCustomizer : SpanMetadataCustomizer {
override fun resolveSpanName(method: PlatformMethod, args: Array<Any?>): String =
"Tool: ${method.declaringClass.simpleName}"
}

Inheritors

Functions

Link copied to clipboard

Formats the input attributes for the span created around the given platform method invocation.

Link copied to clipboard
open fun formatOutputAttribute(result: Any?): String

Formats the output attribute for the span created around the given platform method invocation.

Link copied to clipboard
open fun resolveSpanName(method: PlatformMethod, args: Array<Any?>): String?

Resolves the span name for the given platform method invocation.