Interface TagExtractor<T>
public interface TagExtractor<T>
This provides an utility for extracting request/response tags, potentially allocation-free.
Tag should follow the OpenTracing tag names. This might change in the future if a new spec with a superset (semantically wise) of this list.
- Author:
- Julien Viet
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TagExtractor<T> empty()Extract all the tags fromobjinto aMap<String, String>.default voidextractTo(T obj, BiConsumer<String, String> consumer) Extract all the tags fromobjinto a tagconsumer.default voidExtract all the tags fromobjinto thetagsmap.default intReturns the number of tagsobjexposes.default StringReturns the name of the tag extracted fromobjat the specifiedindex.default StringReturns the value of the tag extracted fromobjat the specifiedindex.
-
Method Details
-
empty
-
len
Returns the number of tagsobjexposes.- Parameters:
obj- the object to evaluate- Returns:
- the number of tags
-
name
-
value
-
extract
-
extractTo
-
extractTo
Extract all the tags fromobjinto a tagconsumer.- Parameters:
obj- the object to extract the tags fromconsumer- the consumer populated with the tags extracted from the object
-