Class Attributes
java.lang.Object
org.opensearch.telemetry.tracing.attributes.Attributes
Class to create attributes for a span.
- Opensearch.experimental:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddAttribute(String key, boolean value) Add boolean attribute.addAttribute(String key, double value) Add double attribute.addAttribute(String key, long value) Add long attribute.addAttribute(String key, String value) Add String attribute.static Attributescreate()Factory method.Returns the attribute map.
-
Field Details
-
EMPTY
Empty value.
-
-
Method Details
-
create
Factory method.- Returns:
- attributes.
-
addAttribute
Add String attribute.- Parameters:
key- keyvalue- value- Returns:
- Same instance.
-
addAttribute
Add long attribute.- Parameters:
key- keyvalue- value- Returns:
- Same instance.
-
addAttribute
Add double attribute.- Parameters:
key- keyvalue- value- Returns:
- Same instance.
-
addAttribute
Add boolean attribute.- Parameters:
key- keyvalue- value- Returns:
- Same instance.
-
getAttributesMap
Returns the attribute map.- Returns:
- attributes map
-