set

abstract operator fun set(key: String, value: String): Span

Sets a string attribute on the span.

Parameters

key

the attribute key.

value

the attribute value.


abstract operator fun set(key: String, value: Long): Span

Sets a long attribute on the span.

Parameters

key

the attribute key.

value

the attribute value.


abstract operator fun set(key: String, value: Double): Span

Sets a double attribute on the span.

Parameters

key

the attribute key.

value

the attribute value.


abstract operator fun set(key: String, value: Boolean): Span

Sets a boolean attribute on the span.

Parameters

key

the attribute key.

value

the attribute value.


abstract operator fun set(key: String, value: List<String>): Span

Sets a string-array attribute on the span (e.g. OTEL gen_ai.response.finish_reasons).

Parameters

key

the attribute key.

value

the attribute value.