Skip to content

OtelAttributeValue

This docs was updated at: 2026-02-23

com.paragon.telemetry.otel.OtelAttributeValue  ยท  Record


OpenTelemetry attribute value wrapper supporting different value types. Only one of the value fields should be set.

Follows the OTLP specification for attribute values.

Methods

ofString

public static @NonNull OtelAttributeValue ofString(@NonNull String value)

Creates a string attribute value.


ofBool

public static @NonNull OtelAttributeValue ofBool(boolean value)

Creates a boolean attribute value.


ofInt

public static @NonNull OtelAttributeValue ofInt(long value)

Creates an integer attribute value.


ofDouble

public static @NonNull OtelAttributeValue ofDouble(double value)

Creates a double attribute value.


of

public static @NonNull OtelAttributeValue of(@Nullable Object value)

Creates an attribute value from any object, inferring the correct type.