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:
Override the default span name resolution via resolveSpanName.
Transform input arguments into structured string representations via formatInputAttributes.
Convert method return values into structured string representations via formatOutputAttribute.
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
Formats the input attributes for the span created around the given platform method invocation.
Formats the output attribute for the span created around the given platform method invocation.
Resolves the span name for the given platform method invocation.