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 | Method and Description |
|---|---|
| public String | Returns: Indicates the scope of the MetricRegistry to be injected. The MicroProfile runtimes providesapplication, base and vendor scopes automatically and creates user-defined scopes
as needed.
see MetricRegistry#APPLICATION_SCOPE, MetricRegistry#BASE_SCOPE and
MetricRegistry#VENDOR_SCOPEThe scope of the MetricRegistry. |
| scope | back to summary |
|---|---|
| public String scope() The scope of the MetricRegistry.
| |