Interface Attributes


  • @Immutable
    public interface Attributes
    An immutable container for attributes.

    The keys are AttributeKeys and the values are Object instances that match the type of the provided key.

    Null keys will be silently dropped.

    Note: The behavior of null-valued attributes is undefined, and hence strongly discouraged.

    Implementations of this interface *must* be immutable and have well-defined value-based equals/hashCode implementations. If an implementation does not strictly conform to these requirements, behavior of the OpenTelemetry APIs and default SDK cannot be guaranteed.

    For this reason, it is strongly suggested that you use the implementation that is provided here via the factory methods and the AttributesBuilder.