Skip to main content

LogAttributesValue

The allowed value type for trace and span attributes: str, int, float, or bool.

Overview

LogAttributesValue is a oneOf union that accepts a single primitive value. It is used as Dict[str, LogAttributesValue] for the attributes parameter when creating or updating traces and spans.

Accepted Types

Values are wrapped via the actual_instance parameter or passed as a positional argument:

Examples

Setting Trace Attributes

Setting Span Attributes

Updating Attributes

Building Attributes Dynamically


Serialization