PrometheusServlet¶
PrometheusServlet
is a metrics sink that comes with a ServletContextHandler to serve metrics snapshots in Prometheus format.
Creating Instance¶
PrometheusServlet
takes the following to be created:
-
Properties
-
MetricRegistry
(Dropwizard Metrics)
PrometheusServlet
is created when:
MetricsSystem
is requested to register metric sinks (withsink.prometheusServlet
configuration)
ServletContextHandler¶
PrometheusServlet
creates a ServletContextHandler
to be registered at the path configured by path
property.
The ServletContextHandler
handles text/plain
content type.
When executed, the ServletContextHandler
gives a metrics snapshot.
Metrics Snapshot¶
getMetricsSnapshot(
request: HttpServletRequest): String
getMetricsSnapshot
...FIXME
getHandlers¶
getHandlers(
conf: SparkConf): Array[ServletContextHandler]
getHandlers
is the ServletContextHandler.
getHandlers
is used when:
MetricsSystem
is requested for servlet handlers