mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 09:47:54 +00:00
Some more adjustment.
* Breaking out some types to make the functionality more composable and easier to digest. (e.g. `basicMetricLister` interacts with Prometheus and `periodicMetricLister` periodically invokes `basicMetricLister`. * Pulling out some of the type embedding between `basicSeriesRegistry` and `MetricLister` to make it easier to digest. * Deleting the `/metric-converter` code because I'm pretty certain it's not going to be necessary as things transition to using the namer-based configuration. * Some light-ish refactoring in `metricNamer` to get some re-use out of query generation in preparation for using it with external metrics.
This commit is contained in:
parent
277734dcdb
commit
76217a552b
15 changed files with 490 additions and 558 deletions
|
|
@ -32,6 +32,9 @@ type DiscoveryRule struct {
|
|||
// `.GroupBy` is the comma-separated expected group-by label names. The delimeters
|
||||
// are `<<` and `>>`.
|
||||
MetricsQuery string `yaml:"metricsQuery,omitempty"`
|
||||
// MetricType identifies whether the metrics derived from this rule should be classified
|
||||
// as external or custom metrics.
|
||||
MetricType MetricType `yaml:"metricType"`
|
||||
}
|
||||
|
||||
// RegexFilter is a filter that matches positively or negatively against a regex.
|
||||
|
|
@ -73,3 +76,6 @@ type NameMapping struct {
|
|||
// if only one is present, and will error if multiple are.
|
||||
As string `yaml:"as"`
|
||||
}
|
||||
|
||||
//MetricType identifies whether a given metric should be handled and interpreted as a Custom or External metric.
|
||||
type MetricType string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue