GenericKtorService
Abstract base class for services that use an embedded Ktor CIO server for admin servlet hosting.
Provides integrated support for:
Admin endpoints: ping, version, health check, and thread dump servlets via KtorServletService
Prometheus metrics: JVM and application metrics exported via MetricsService
Zipkin tracing: distributed trace reporting via ZipkinReporterService
Health checks: Dropwizard health check registry with thread deadlock and service state monitoring
Service lifecycle: coordinated startup/shutdown of all sub-services via a Guava ServiceManager
Subclasses should call initKtorServletService during initialization to set up the service infrastructure.
Parameters
The application-specific configuration values.
Configuration for admin endpoints.
Configuration for Prometheus metrics.
Configuration for Zipkin tracing.
A lambda returning the application version string for the version endpoint.
Whether the service is running in test mode.
Type Parameters
The type of the configuration values object.
Properties
Whether admin endpoints are enabled, based on AdminConfig.enabled.
Whether Prometheus metrics collection is enabled, based on MetricsConfig.enabled.
Whether Zipkin distributed tracing is enabled, based on ZipkinConfig.enabled.
The JMX reporter for Dropwizard metrics. Initialized when metrics are enabled.
The Prometheus metrics service. Initialized when metrics are enabled.
The Ktor-based servlet service hosting admin endpoints. Initialized when admin is enabled.
The Zipkin span reporter service. Initialized when Zipkin tracing is enabled.
Functions
Initializes the Ktor servlet service, metrics, Zipkin tracing, and health checks.