OpenTelemetry笔记(5)-Attributes
AttributeKey
是带有类型的键
接口定义
1 | public interface AttributeKey<T> { |
创建 AttributeKey
使用 AttributeKey 的静态方法进行快捷创建
1 | AttributeKey.stringKey("hello"); |
Attributes
Attribute 由一个 AttributeKey 和 Value 组成,类似于 Map 的 MapEntry
是带有类型的键
1 | public interface AttributeKey<T> { |
使用 AttributeKey 的静态方法进行快捷创建
1 | AttributeKey.stringKey("hello"); |
Attribute 由一个 AttributeKey 和 Value 组成,类似于 Map 的 MapEntry