Package org.microproxy.stats
Interface Metric
public interface Metric
A named statistic of a
StatsRegistry: a Counter, a Gauge or a Histogram.
Every metric has two names. Its flat name is Envoy's, with every value
in it (http.ingress.downstream_rq_2xx), as the /stats text dump and statsd show
it. Its tag-extracted name has those values taken out as
tags by the registry's TagExtractor when the metric is registered
(http.downstream_rq_xx with envoy_http_conn_manager_prefix="ingress" and
envoy_response_code_class="2"), as Prometheus shows it.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionhelp()Returns a one-line description for Prometheus's# HELPline, or an empty string.name()Returns the flat name, such ascluster.direct.upstream_rq_total.Returns the name with its tag values taken out, such ascluster.upstream_rq_total.tags()Returns the tags taken out of the flat name, in the order they were found.type()Returns what kind of metric this is.
-
Method Details
-
name
String name()Returns the flat name, such ascluster.direct.upstream_rq_total.- Returns:
- the flat name, such as
cluster.direct.upstream_rq_total
-
tagExtractedName
String tagExtractedName()Returns the name with its tag values taken out, such ascluster.upstream_rq_total.- Returns:
- the name with its tag values taken out, such as
cluster.upstream_rq_total
-
tags
Returns the tags taken out of the flat name, in the order they were found.- Returns:
- the tags taken out of the flat name, in the order they were found
-
type
Metric.Type type()Returns what kind of metric this is.- Returns:
- what kind of metric this is
-
help
String help()Returns a one-line description for Prometheus's# HELPline, or an empty string.- Returns:
- a one-line description for Prometheus's
# HELPline, or an empty string
-