Interface Metrics.Tag
- All Known Implementing Classes:
Metrics.Tag.Caller,Metrics.Tag.Channel,Metrics.Tag.CommandId,Metrics.Tag.CommandInvocation,Metrics.Tag.Guild,Metrics.Tag.Type
- Enclosing class:
- Metrics
public static interface Metrics.Tag
Tags used in metrics.
- Since:
- 1.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordThe tag that indicates the user who invoked the command.static final recordThe tag that indicates the channel that the command was called from.static final recordThe tag that indicates the command ID.static final recordThe tag that indicates the command invocation.static final recordThe tag that indicates the guild that the command was called from, if any.static enumThe tag that indicates the command type. -
Method Summary
Modifier and TypeMethodDescriptiondefault <T> Flux<T>Applies this tag to the given flux usingFlux.tag(String, String).default <T> Mono<T>Applies this tag to the given mono usingMono.tag(String, String).key()Retrieves the tag key.value()Retrieves the tag value.
-
Method Details
-
key
Retrieves the tag key.- Returns:
- The tag key.
-
value
Retrieves the tag value.- Returns:
- The tag value.
-
apply
Applies this tag to the given mono usingMono.tag(String, String).- Type Parameters:
T- The mono value type.- Parameters:
mono- The mono to apply the tag to.- Returns:
- The mono with the tag applied.
-
apply
Applies this tag to the given flux usingFlux.tag(String, String).- Type Parameters:
T- The flux value type.- Parameters:
flux- The flux to apply the tag to.- Returns:
- The flux with the tag applied.
-