Class MicrometerSupport
java.lang.Object
io.helidon.servicecommon.rest.HelidonRestServiceSupport
io.helidon.integrations.micrometer.MicrometerSupport
- All Implemented Interfaces:
RestServiceSupport
,Service
Implements simple Micrometer support.
Developers create Micrometer MeterRegistry
objects and enroll them with
MicrometerSupport.Builder
, providing with each enrollment a Helidon Handler
for expressing the registry's
data in an HTTP response.
Alternatively, developers can enroll any of the built-in registries represented by
the MeterRegistryFactory.BuiltInRegistryType
enum.
Having enrolled Micrometer meter registries with MicrometerSupport.Builder
and built the
MicrometerSupport
object, developers can invoke the registry()
method and use the returned
MeterRegistry
to create or locate meters.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fluid builder forMicrometerSupport
objects. -
Method Summary
Modifier and TypeMethodDescriptionstatic MicrometerSupport.Builder
builder()
Fluid builder forMicrometerSupport
.static MicrometerSupport
create()
Creates a newMicrometerSupport
using default settings.static MicrometerSupport
Creates a newMicrometerSupport
using the providedConfig
(anchored at the "metrics.micrometer" node).protected void
postConfigureEndpoint
(Routing.Rules defaultRules, Routing.Rules serviceEndpointRoutingRules) Concrete implementations override this method to perform any service-specific routing set-up.io.micrometer.core.instrument.MeterRegistry
registry()
Returns the composite registry so apps can create and register meters on it.void
update
(Routing.Rules rules) UpdatesRouting.Rules
withhandlers
representing this service.Methods inherited from class io.helidon.servicecommon.rest.HelidonRestServiceSupport
configureEndpoint, context, logger, onShutdown
-
Method Details
-
builder
Fluid builder forMicrometerSupport
.- Returns:
- Builder
-
create
Creates a newMicrometerSupport
using default settings.- Returns:
- default MicrometerSupport
-
create
Creates a newMicrometerSupport
using the providedConfig
(anchored at the "metrics.micrometer" node).- Parameters:
config
- Config settings for Micrometer set-up- Returns:
- newly-created MicrometerSupport
-
registry
public io.micrometer.core.instrument.MeterRegistry registry()Returns the composite registry so apps can create and register meters on it.- Returns:
- the composite registry
-
update
Description copied from interface:Service
UpdatesRouting.Rules
withhandlers
representing this service.- Parameters:
rules
- a routing rules to update
-
postConfigureEndpoint
protected void postConfigureEndpoint(Routing.Rules defaultRules, Routing.Rules serviceEndpointRoutingRules) Description copied from class:HelidonRestServiceSupport
Concrete implementations override this method to perform any service-specific routing set-up.- Specified by:
postConfigureEndpoint
in classHelidonRestServiceSupport
- Parameters:
defaultRules
- defaultRouting.Rules
to be updatedserviceEndpointRoutingRules
- actual rules (if different from the default ones) to be updated for the service endpoint
-