restrictToolNameCardinality

fun OpenTelemetryConfig.restrictToolNameCardinality(allowedToolNames: Set<String>, fallbackToolName: String = FALLBACK_TOOL_NAME)(source)

Restricts tool names in the attributes' metric and sets the fallback tool name when a tool is not allowed. Helps to manage cardinality of the metric.

Parameters

allowedToolNames

A set of allowed tool names

fallbackToolName

The fallback / default tool name if not in the allowed set