Skip to main content

LogAttributesValue

The allowed value types for key-value attributes on traces and spans. Attributes are used as Record<string, LogAttributesValue> throughout the observability API.

Import

Type Definition

Attributes are flat key-value pairs where keys are strings and values are one of:

Usage

Attributes appear as Record<string, LogAttributesValue> in these methods:

Examples

Trace Attributes

Span Attributes

Updating Attributes

Typed Helper


  • Trace — accepts attributes via logTrace() and trace.update()
  • Span — accepts attributes via logSpan() and span.update()
  • Monitor — entry point for creating traces with attributes