@Documented
@Retention(value=RUNTIME)
@Target(value={METHOD,FIELD,PARAMETER,ANNOTATION_TYPE})
public @interface RegistryScope
This can be used to obtain the respective scoped MetricRegistry:
@Inject
@RegistryScope(scope=MetricRegistry.APPLICATION_SCOPE)
MetricRegistry appRegistry;
@Inject
@RegistryScope(scope="customScope")
MetricRegistry customRegistry;
see MetricRegistry.APPLICATION_SCOPE, MetricRegistry.BASE_SCOPE and
MetricRegistry.VENDOR_SCOPE| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
scope
The scope of the MetricRegistry.
|
public abstract java.lang.String scope
application, base and vendor scopes automatically and creates user-defined scopes
as needed.
see MetricRegistry.APPLICATION_SCOPE, MetricRegistry.BASE_SCOPE and
MetricRegistry.VENDOR_SCOPE