mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04:00
Add generated metrics and documentation
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
This commit is contained in:
parent
3412366a6a
commit
a5e5969457
20 changed files with 8461 additions and 0 deletions
31
config/semconv/README.md
Normal file
31
config/semconv/README.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_config_last_reload_success_timestamp_seconds` | gauge | s | Timestamp of the last successful configuration reload. |
|
||||
| `prometheus_config_last_reload_successful` | gauge | 1 | Whether the last configuration reload attempt was successful. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_config_last_reload_success_timestamp_seconds`
|
||||
|
||||
Timestamp of the last successful configuration reload.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_config_last_reload_successful`
|
||||
|
||||
Whether the last configuration reload attempt was successful.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
77
config/semconv/metrics.go
Normal file
77
config/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
|
||||
// PrometheusConfigLastReloadSuccessTimestampSeconds records the timestamp of the last successful configuration reload.
|
||||
type PrometheusConfigLastReloadSuccessTimestampSeconds struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusConfigLastReloadSuccessTimestampSeconds returns a new PrometheusConfigLastReloadSuccessTimestampSeconds instrument.
|
||||
func NewPrometheusConfigLastReloadSuccessTimestampSeconds() PrometheusConfigLastReloadSuccessTimestampSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusConfigLastReloadSuccessTimestampSeconds{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_config_last_reload_success_timestamp_seconds",
|
||||
Help: "Timestamp of the last successful configuration reload.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusConfigLastReloadSuccessTimestampSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusConfigLastReloadSuccessTimestampSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusConfigLastReloadSuccessTimestampSeconds) With(
|
||||
extra ...PrometheusConfigLastReloadSuccessTimestampSecondsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusConfigLastReloadSuccessful records the whether the last configuration reload attempt was successful.
|
||||
type PrometheusConfigLastReloadSuccessful struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusConfigLastReloadSuccessful returns a new PrometheusConfigLastReloadSuccessful instrument.
|
||||
func NewPrometheusConfigLastReloadSuccessful() PrometheusConfigLastReloadSuccessful {
|
||||
labels := []string{}
|
||||
return PrometheusConfigLastReloadSuccessful{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_config_last_reload_successful",
|
||||
Help: "Whether the last configuration reload attempt was successful.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusConfigLastReloadSuccessfulAttr interface {
|
||||
Attribute
|
||||
implPrometheusConfigLastReloadSuccessful()
|
||||
}
|
||||
|
||||
func (m PrometheusConfigLastReloadSuccessful) With(
|
||||
extra ...PrometheusConfigLastReloadSuccessfulAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
357
discovery/semconv/README.md
Normal file
357
discovery/semconv/README.md
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_sd_azure_cache_hit_total` | counter | {hit} | Number of cache hits during Azure SD. |
|
||||
| `prometheus_sd_azure_failures_total` | counter | {failure} | Number of Azure SD failures. |
|
||||
| `prometheus_sd_consul_rpc_duration_seconds` | histogram | s | The duration of a Consul RPC call. |
|
||||
| `prometheus_sd_consul_rpc_failures_total` | counter | {failure} | Number of Consul RPC call failures. |
|
||||
| `prometheus_sd_discovered_targets` | gauge | {target} | Current number of discovered targets. |
|
||||
| `prometheus_sd_dns_lookup_failures_total` | counter | {failure} | Number of DNS SD lookup failures. |
|
||||
| `prometheus_sd_dns_lookups_total` | counter | {lookup} | Number of DNS SD lookups. |
|
||||
| `prometheus_sd_failed_configs` | gauge | {config} | Current number of service discovery configurations that failed to load. |
|
||||
| `prometheus_sd_file_mtime_seconds` | gauge | s | The modification time of the SD file. |
|
||||
| `prometheus_sd_file_read_errors_total` | counter | {error} | Number of file SD read errors. |
|
||||
| `prometheus_sd_file_scan_duration_seconds` | histogram | s | The duration of the file SD scan. |
|
||||
| `prometheus_sd_file_watcher_errors_total` | counter | {error} | Number of file SD watcher errors. |
|
||||
| `prometheus_sd_http_failures_total` | counter | {failure} | Number of HTTP SD failures. |
|
||||
| `prometheus_sd_kubernetes_events_total` | counter | {event} | Number of Kubernetes events processed. |
|
||||
| `prometheus_sd_kubernetes_failures_total` | counter | {failure} | Number of Kubernetes SD failures. |
|
||||
| `prometheus_sd_kuma_fetch_duration_seconds` | histogram | s | The duration of a Kuma MADS fetch call. |
|
||||
| `prometheus_sd_kuma_fetch_failures_total` | counter | {failure} | Number of Kuma SD fetch failures. |
|
||||
| `prometheus_sd_kuma_fetch_skipped_updates_total` | counter | {update} | Number of Kuma SD updates skipped due to no changes. |
|
||||
| `prometheus_sd_linode_failures_total` | counter | {failure} | Number of Linode SD failures. |
|
||||
| `prometheus_sd_nomad_failures_total` | counter | {failure} | Number of Nomad SD failures. |
|
||||
| `prometheus_sd_received_updates_total` | counter | {update} | Total number of update events received from the SD providers. |
|
||||
| `prometheus_sd_refresh_duration_histogram_seconds` | histogram | s | The duration of a SD refresh cycle as a histogram. |
|
||||
| `prometheus_sd_refresh_duration_seconds` | histogram | s | The duration of a SD refresh cycle. |
|
||||
| `prometheus_sd_refresh_failures_total` | counter | {failure} | Number of SD refresh failures. |
|
||||
| `prometheus_sd_updates_delayed_total` | counter | {update} | Total number of update events that couldn't be sent immediately. |
|
||||
| `prometheus_sd_updates_total` | counter | {update} | Total number of update events sent to the SD consumers. |
|
||||
| `prometheus_treecache_watcher_goroutines` | gauge | {goroutine} | The current number of treecache watcher goroutines. |
|
||||
| `prometheus_treecache_zookeeper_failures_total` | counter | {failure} | Total number of ZooKeeper failures. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_sd_azure_cache_hit_total`
|
||||
|
||||
Number of cache hits during Azure SD.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {hit}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_azure_failures_total`
|
||||
|
||||
Number of Azure SD failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_consul_rpc_duration_seconds`
|
||||
|
||||
The duration of a Consul RPC call.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_consul_rpc_failures_total`
|
||||
|
||||
Number of Consul RPC call failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_discovered_targets`
|
||||
|
||||
Current number of discovered targets.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {target}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `config` | string | The scrape config name. | prometheus, node_exporter |
|
||||
| `name` | string | The discovery manager name. | scrape, notify |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_dns_lookup_failures_total`
|
||||
|
||||
Number of DNS SD lookup failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_dns_lookups_total`
|
||||
|
||||
Number of DNS SD lookups.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {lookup}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_failed_configs`
|
||||
|
||||
Current number of service discovery configurations that failed to load.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {config}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `name` | string | The discovery manager name. | scrape, notify |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_file_mtime_seconds`
|
||||
|
||||
The modification time of the SD file.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `filename` | string | The file path. | /etc/prometheus/file_sd/targets.json |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_file_read_errors_total`
|
||||
|
||||
Number of file SD read errors.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {error}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_file_scan_duration_seconds`
|
||||
|
||||
The duration of the file SD scan.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_file_watcher_errors_total`
|
||||
|
||||
Number of file SD watcher errors.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {error}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_http_failures_total`
|
||||
|
||||
Number of HTTP SD failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_kubernetes_events_total`
|
||||
|
||||
Number of Kubernetes events processed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {event}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `event` | string | The event type. | add, update, delete |
|
||||
| `role` | string | The Kubernetes role. | pod, node, service, endpoints |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_kubernetes_failures_total`
|
||||
|
||||
Number of Kubernetes SD failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_kuma_fetch_duration_seconds`
|
||||
|
||||
The duration of a Kuma MADS fetch call.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_kuma_fetch_failures_total`
|
||||
|
||||
Number of Kuma SD fetch failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_kuma_fetch_skipped_updates_total`
|
||||
|
||||
Number of Kuma SD updates skipped due to no changes.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {update}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_linode_failures_total`
|
||||
|
||||
Number of Linode SD failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_nomad_failures_total`
|
||||
|
||||
Number of Nomad SD failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_received_updates_total`
|
||||
|
||||
Total number of update events received from the SD providers.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {update}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `name` | string | The discovery manager name. | scrape, notify |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_refresh_duration_histogram_seconds`
|
||||
|
||||
The duration of a SD refresh cycle as a histogram.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `mechanism` | string | The service discovery mechanism. | dns, kubernetes, consul |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_refresh_duration_seconds`
|
||||
|
||||
The duration of a SD refresh cycle.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_sd_refresh_failures_total`
|
||||
|
||||
Number of SD refresh failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `config` | string | The scrape config name. | prometheus |
|
||||
| `mechanism` | string | The service discovery mechanism. | dns, kubernetes |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_updates_delayed_total`
|
||||
|
||||
Total number of update events that couldn't be sent immediately.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {update}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `name` | string | The discovery manager name. | scrape, notify |
|
||||
|
||||
|
||||
|
||||
### `prometheus_sd_updates_total`
|
||||
|
||||
Total number of update events sent to the SD consumers.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {update}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `name` | string | The discovery manager name. | scrape, notify |
|
||||
|
||||
|
||||
|
||||
### `prometheus_treecache_watcher_goroutines`
|
||||
|
||||
The current number of treecache watcher goroutines.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {goroutine}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_treecache_zookeeper_failures_total`
|
||||
|
||||
Total number of ZooKeeper failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
1005
discovery/semconv/metrics.go
Normal file
1005
discovery/semconv/metrics.go
Normal file
File diff suppressed because it is too large
Load diff
51
notifier/semconv/README.md
Normal file
51
notifier/semconv/README.md
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_notifications_alertmanagers_discovered` | gauge | {alertmanager} | The number of alertmanagers discovered and active. |
|
||||
| `prometheus_notifications_dropped_total` | counter | {notification} | Total number of alerts dropped due to errors when sending to Alertmanager. |
|
||||
| `prometheus_notifications_queue_capacity` | gauge | {notification} | The capacity of the alert notifications queue. |
|
||||
| `prometheus_notifications_queue_length` | gauge | {notification} | The number of alert notifications in the queue. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_notifications_alertmanagers_discovered`
|
||||
|
||||
The number of alertmanagers discovered and active.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {alertmanager}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_notifications_dropped_total`
|
||||
|
||||
Total number of alerts dropped due to errors when sending to Alertmanager.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {notification}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_notifications_queue_capacity`
|
||||
|
||||
The capacity of the alert notifications queue.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {notification}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_notifications_queue_length`
|
||||
|
||||
The number of alert notifications in the queue.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {notification}
|
||||
- **Stability:** development
|
||||
139
notifier/semconv/metrics.go
Normal file
139
notifier/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
|
||||
// PrometheusNotificationsAlertmanagersDiscovered records the number of alertmanagers discovered and active.
|
||||
type PrometheusNotificationsAlertmanagersDiscovered struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusNotificationsAlertmanagersDiscovered returns a new PrometheusNotificationsAlertmanagersDiscovered instrument.
|
||||
func NewPrometheusNotificationsAlertmanagersDiscovered() PrometheusNotificationsAlertmanagersDiscovered {
|
||||
labels := []string{}
|
||||
return PrometheusNotificationsAlertmanagersDiscovered{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_notifications_alertmanagers_discovered",
|
||||
Help: "The number of alertmanagers discovered and active.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusNotificationsAlertmanagersDiscoveredAttr interface {
|
||||
Attribute
|
||||
implPrometheusNotificationsAlertmanagersDiscovered()
|
||||
}
|
||||
|
||||
func (m PrometheusNotificationsAlertmanagersDiscovered) With(
|
||||
extra ...PrometheusNotificationsAlertmanagersDiscoveredAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusNotificationsDroppedTotal records the total number of alerts dropped due to errors when sending to Alertmanager.
|
||||
type PrometheusNotificationsDroppedTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusNotificationsDroppedTotal returns a new PrometheusNotificationsDroppedTotal instrument.
|
||||
func NewPrometheusNotificationsDroppedTotal() PrometheusNotificationsDroppedTotal {
|
||||
labels := []string{}
|
||||
return PrometheusNotificationsDroppedTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_notifications_dropped_total",
|
||||
Help: "Total number of alerts dropped due to errors when sending to Alertmanager.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusNotificationsDroppedTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusNotificationsDroppedTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusNotificationsDroppedTotal) With(
|
||||
extra ...PrometheusNotificationsDroppedTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusNotificationsQueueCapacity records the capacity of the alert notifications queue.
|
||||
type PrometheusNotificationsQueueCapacity struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusNotificationsQueueCapacity returns a new PrometheusNotificationsQueueCapacity instrument.
|
||||
func NewPrometheusNotificationsQueueCapacity() PrometheusNotificationsQueueCapacity {
|
||||
labels := []string{}
|
||||
return PrometheusNotificationsQueueCapacity{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_notifications_queue_capacity",
|
||||
Help: "The capacity of the alert notifications queue.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusNotificationsQueueCapacityAttr interface {
|
||||
Attribute
|
||||
implPrometheusNotificationsQueueCapacity()
|
||||
}
|
||||
|
||||
func (m PrometheusNotificationsQueueCapacity) With(
|
||||
extra ...PrometheusNotificationsQueueCapacityAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusNotificationsQueueLength records the number of alert notifications in the queue.
|
||||
type PrometheusNotificationsQueueLength struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusNotificationsQueueLength returns a new PrometheusNotificationsQueueLength instrument.
|
||||
func NewPrometheusNotificationsQueueLength() PrometheusNotificationsQueueLength {
|
||||
labels := []string{}
|
||||
return PrometheusNotificationsQueueLength{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_notifications_queue_length",
|
||||
Help: "The number of alert notifications in the queue.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusNotificationsQueueLengthAttr interface {
|
||||
Attribute
|
||||
implPrometheusNotificationsQueueLength()
|
||||
}
|
||||
|
||||
func (m PrometheusNotificationsQueueLength) With(
|
||||
extra ...PrometheusNotificationsQueueLengthAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
88
promql/semconv/README.md
Normal file
88
promql/semconv/README.md
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_engine_queries` | gauge | {query} | The current number of queries being executed or waiting. |
|
||||
| `prometheus_engine_queries_concurrent_max` | gauge | {query} | The max number of concurrent queries. |
|
||||
| `prometheus_engine_query_duration_histogram_seconds` | histogram | s | Histogram of query timings. |
|
||||
| `prometheus_engine_query_duration_seconds` | histogram | s | Query timings. |
|
||||
| `prometheus_engine_query_log_enabled` | gauge | 1 | State of the query log. |
|
||||
| `prometheus_engine_query_log_failures_total` | counter | {failure} | The number of query log failures. |
|
||||
| `prometheus_engine_query_samples_total` | counter | {sample} | The total number of samples loaded by all queries. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_engine_queries`
|
||||
|
||||
The current number of queries being executed or waiting.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {query}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_engine_queries_concurrent_max`
|
||||
|
||||
The max number of concurrent queries.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {query}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_engine_query_duration_histogram_seconds`
|
||||
|
||||
Histogram of query timings.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `slice` | string | The query execution phase. | inner_eval, prepare_time, queue_time, result_sort |
|
||||
|
||||
|
||||
|
||||
### `prometheus_engine_query_duration_seconds`
|
||||
|
||||
Query timings.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_engine_query_log_enabled`
|
||||
|
||||
State of the query log.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_engine_query_log_failures_total`
|
||||
|
||||
The number of query log failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_engine_query_samples_total`
|
||||
|
||||
The total number of samples loaded by all queries.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
247
promql/semconv/metrics.go
Normal file
247
promql/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
type SliceAttr string
|
||||
|
||||
func (a SliceAttr) ID() string {
|
||||
return "slice"
|
||||
}
|
||||
|
||||
func (a SliceAttr) Value() string {
|
||||
return string(a)
|
||||
}
|
||||
|
||||
// PrometheusEngineQueries records the current number of queries being executed or waiting.
|
||||
type PrometheusEngineQueries struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusEngineQueries returns a new PrometheusEngineQueries instrument.
|
||||
func NewPrometheusEngineQueries() PrometheusEngineQueries {
|
||||
labels := []string{}
|
||||
return PrometheusEngineQueries{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_engine_queries",
|
||||
Help: "The current number of queries being executed or waiting.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusEngineQueriesAttr interface {
|
||||
Attribute
|
||||
implPrometheusEngineQueries()
|
||||
}
|
||||
|
||||
func (m PrometheusEngineQueries) With(
|
||||
extra ...PrometheusEngineQueriesAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusEngineQueriesConcurrentMax records the max number of concurrent queries.
|
||||
type PrometheusEngineQueriesConcurrentMax struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusEngineQueriesConcurrentMax returns a new PrometheusEngineQueriesConcurrentMax instrument.
|
||||
func NewPrometheusEngineQueriesConcurrentMax() PrometheusEngineQueriesConcurrentMax {
|
||||
labels := []string{}
|
||||
return PrometheusEngineQueriesConcurrentMax{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_engine_queries_concurrent_max",
|
||||
Help: "The max number of concurrent queries.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusEngineQueriesConcurrentMaxAttr interface {
|
||||
Attribute
|
||||
implPrometheusEngineQueriesConcurrentMax()
|
||||
}
|
||||
|
||||
func (m PrometheusEngineQueriesConcurrentMax) With(
|
||||
extra ...PrometheusEngineQueriesConcurrentMaxAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusEngineQueryDurationHistogramSeconds records the histogram of query timings.
|
||||
type PrometheusEngineQueryDurationHistogramSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusEngineQueryDurationHistogramSeconds returns a new PrometheusEngineQueryDurationHistogramSeconds instrument.
|
||||
func NewPrometheusEngineQueryDurationHistogramSeconds() PrometheusEngineQueryDurationHistogramSeconds {
|
||||
labels := []string{
|
||||
"slice",
|
||||
}
|
||||
return PrometheusEngineQueryDurationHistogramSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_engine_query_duration_histogram_seconds",
|
||||
Help: "Histogram of query timings.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusEngineQueryDurationHistogramSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusEngineQueryDurationHistogramSeconds()
|
||||
}
|
||||
|
||||
func (a SliceAttr) implPrometheusEngineQueryDurationHistogramSeconds() {}
|
||||
|
||||
func (m PrometheusEngineQueryDurationHistogramSeconds) With(
|
||||
extra ...PrometheusEngineQueryDurationHistogramSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{
|
||||
"slice": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusEngineQueryDurationSeconds records the query timings.
|
||||
type PrometheusEngineQueryDurationSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusEngineQueryDurationSeconds returns a new PrometheusEngineQueryDurationSeconds instrument.
|
||||
func NewPrometheusEngineQueryDurationSeconds() PrometheusEngineQueryDurationSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusEngineQueryDurationSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_engine_query_duration_seconds",
|
||||
Help: "Query timings.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusEngineQueryDurationSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusEngineQueryDurationSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusEngineQueryDurationSeconds) With(
|
||||
extra ...PrometheusEngineQueryDurationSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusEngineQueryLogEnabled records the state of the query log.
|
||||
type PrometheusEngineQueryLogEnabled struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusEngineQueryLogEnabled returns a new PrometheusEngineQueryLogEnabled instrument.
|
||||
func NewPrometheusEngineQueryLogEnabled() PrometheusEngineQueryLogEnabled {
|
||||
labels := []string{}
|
||||
return PrometheusEngineQueryLogEnabled{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_engine_query_log_enabled",
|
||||
Help: "State of the query log.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusEngineQueryLogEnabledAttr interface {
|
||||
Attribute
|
||||
implPrometheusEngineQueryLogEnabled()
|
||||
}
|
||||
|
||||
func (m PrometheusEngineQueryLogEnabled) With(
|
||||
extra ...PrometheusEngineQueryLogEnabledAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusEngineQueryLogFailuresTotal records the number of query log failures.
|
||||
type PrometheusEngineQueryLogFailuresTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusEngineQueryLogFailuresTotal returns a new PrometheusEngineQueryLogFailuresTotal instrument.
|
||||
func NewPrometheusEngineQueryLogFailuresTotal() PrometheusEngineQueryLogFailuresTotal {
|
||||
labels := []string{}
|
||||
return PrometheusEngineQueryLogFailuresTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_engine_query_log_failures_total",
|
||||
Help: "The number of query log failures.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusEngineQueryLogFailuresTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusEngineQueryLogFailuresTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusEngineQueryLogFailuresTotal) With(
|
||||
extra ...PrometheusEngineQueryLogFailuresTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusEngineQuerySamplesTotal records the total number of samples loaded by all queries.
|
||||
type PrometheusEngineQuerySamplesTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusEngineQuerySamplesTotal returns a new PrometheusEngineQuerySamplesTotal instrument.
|
||||
func NewPrometheusEngineQuerySamplesTotal() PrometheusEngineQuerySamplesTotal {
|
||||
labels := []string{}
|
||||
return PrometheusEngineQuerySamplesTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_engine_query_samples_total",
|
||||
Help: "The total number of samples loaded by all queries.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusEngineQuerySamplesTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusEngineQuerySamplesTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusEngineQuerySamplesTotal) With(
|
||||
extra ...PrometheusEngineQuerySamplesTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
238
rules/semconv/README.md
Normal file
238
rules/semconv/README.md
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_rule_evaluation_duration_histogram_seconds` | histogram | s | The duration of rule evaluations as a histogram. |
|
||||
| `prometheus_rule_evaluation_duration_seconds` | histogram | s | The duration of rule group evaluations. |
|
||||
| `prometheus_rule_evaluation_failures_total` | counter | {failure} | The total number of rule evaluation failures. |
|
||||
| `prometheus_rule_evaluations_total` | counter | {evaluation} | The total number of rule evaluations. |
|
||||
| `prometheus_rule_group_duration_histogram_seconds` | histogram | s | The duration of rule group evaluations as a histogram. |
|
||||
| `prometheus_rule_group_duration_seconds` | histogram | s | The duration of rule group evaluations. |
|
||||
| `prometheus_rule_group_interval_seconds` | gauge | s | The interval of a rule group. |
|
||||
| `prometheus_rule_group_iterations_missed_total` | counter | {iteration} | The total number of rule group evaluations missed due to slow rule group evaluation. |
|
||||
| `prometheus_rule_group_iterations_total` | counter | {iteration} | The total number of scheduled rule group evaluations. |
|
||||
| `prometheus_rule_group_last_duration_seconds` | gauge | s | The duration of the last rule group evaluation. |
|
||||
| `prometheus_rule_group_last_evaluation_samples` | gauge | {sample} | The number of samples returned during the last rule group evaluation. |
|
||||
| `prometheus_rule_group_last_evaluation_timestamp_seconds` | gauge | s | The timestamp of the last rule group evaluation. |
|
||||
| `prometheus_rule_group_last_restore_duration_seconds` | gauge | s | The duration of the last alert restoration from the ALERTS_FOR_STATE series. |
|
||||
| `prometheus_rule_group_last_rule_duration_sum_seconds` | gauge | s | The sum of the durations of all rules in the last rule group evaluation. |
|
||||
| `prometheus_rule_group_rules` | gauge | {rule} | The number of rules in a rule group. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_rule_evaluation_duration_histogram_seconds`
|
||||
|
||||
The duration of rule evaluations as a histogram.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_rule_evaluation_duration_seconds`
|
||||
|
||||
The duration of rule group evaluations.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_rule_evaluation_failures_total`
|
||||
|
||||
The total number of rule evaluation failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_evaluations_total`
|
||||
|
||||
The total number of rule evaluations.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {evaluation}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_duration_histogram_seconds`
|
||||
|
||||
The duration of rule group evaluations as a histogram.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_rule_group_duration_seconds`
|
||||
|
||||
The duration of rule group evaluations.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_rule_group_interval_seconds`
|
||||
|
||||
The interval of a rule group.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_iterations_missed_total`
|
||||
|
||||
The total number of rule group evaluations missed due to slow rule group evaluation.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {iteration}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_iterations_total`
|
||||
|
||||
The total number of scheduled rule group evaluations.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {iteration}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_last_duration_seconds`
|
||||
|
||||
The duration of the last rule group evaluation.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_last_evaluation_samples`
|
||||
|
||||
The number of samples returned during the last rule group evaluation.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_last_evaluation_timestamp_seconds`
|
||||
|
||||
The timestamp of the last rule group evaluation.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_last_restore_duration_seconds`
|
||||
|
||||
The duration of the last alert restoration from the ALERTS_FOR_STATE series.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_last_rule_duration_sum_seconds`
|
||||
|
||||
The sum of the durations of all rules in the last rule group evaluation.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
|
||||
|
||||
### `prometheus_rule_group_rules`
|
||||
|
||||
The number of rules in a rule group.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {rule}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `rule_group` | string | The rule group name. | alerting_rules.yml;my_group |
|
||||
|
||||
555
rules/semconv/metrics.go
Normal file
555
rules/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,555 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
type RuleGroupAttr string
|
||||
|
||||
func (a RuleGroupAttr) ID() string {
|
||||
return "rule_group"
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) Value() string {
|
||||
return string(a)
|
||||
}
|
||||
|
||||
// PrometheusRuleEvaluationDurationHistogramSeconds records the duration of rule evaluations as a histogram.
|
||||
type PrometheusRuleEvaluationDurationHistogramSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleEvaluationDurationHistogramSeconds returns a new PrometheusRuleEvaluationDurationHistogramSeconds instrument.
|
||||
func NewPrometheusRuleEvaluationDurationHistogramSeconds() PrometheusRuleEvaluationDurationHistogramSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusRuleEvaluationDurationHistogramSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_rule_evaluation_duration_histogram_seconds",
|
||||
Help: "The duration of rule evaluations as a histogram.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleEvaluationDurationHistogramSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleEvaluationDurationHistogramSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusRuleEvaluationDurationHistogramSeconds) With(
|
||||
extra ...PrometheusRuleEvaluationDurationHistogramSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleEvaluationDurationSeconds records the duration of rule group evaluations.
|
||||
type PrometheusRuleEvaluationDurationSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleEvaluationDurationSeconds returns a new PrometheusRuleEvaluationDurationSeconds instrument.
|
||||
func NewPrometheusRuleEvaluationDurationSeconds() PrometheusRuleEvaluationDurationSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusRuleEvaluationDurationSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_rule_evaluation_duration_seconds",
|
||||
Help: "The duration of rule group evaluations.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleEvaluationDurationSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleEvaluationDurationSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusRuleEvaluationDurationSeconds) With(
|
||||
extra ...PrometheusRuleEvaluationDurationSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleEvaluationFailuresTotal records the total number of rule evaluation failures.
|
||||
type PrometheusRuleEvaluationFailuresTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleEvaluationFailuresTotal returns a new PrometheusRuleEvaluationFailuresTotal instrument.
|
||||
func NewPrometheusRuleEvaluationFailuresTotal() PrometheusRuleEvaluationFailuresTotal {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleEvaluationFailuresTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_rule_evaluation_failures_total",
|
||||
Help: "The total number of rule evaluation failures.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleEvaluationFailuresTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleEvaluationFailuresTotal()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleEvaluationFailuresTotal() {}
|
||||
|
||||
func (m PrometheusRuleEvaluationFailuresTotal) With(
|
||||
extra ...PrometheusRuleEvaluationFailuresTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleEvaluationsTotal records the total number of rule evaluations.
|
||||
type PrometheusRuleEvaluationsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleEvaluationsTotal returns a new PrometheusRuleEvaluationsTotal instrument.
|
||||
func NewPrometheusRuleEvaluationsTotal() PrometheusRuleEvaluationsTotal {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleEvaluationsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_rule_evaluations_total",
|
||||
Help: "The total number of rule evaluations.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleEvaluationsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleEvaluationsTotal()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleEvaluationsTotal() {}
|
||||
|
||||
func (m PrometheusRuleEvaluationsTotal) With(
|
||||
extra ...PrometheusRuleEvaluationsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupDurationHistogramSeconds records the duration of rule group evaluations as a histogram.
|
||||
type PrometheusRuleGroupDurationHistogramSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupDurationHistogramSeconds returns a new PrometheusRuleGroupDurationHistogramSeconds instrument.
|
||||
func NewPrometheusRuleGroupDurationHistogramSeconds() PrometheusRuleGroupDurationHistogramSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusRuleGroupDurationHistogramSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_rule_group_duration_histogram_seconds",
|
||||
Help: "The duration of rule group evaluations as a histogram.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupDurationHistogramSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupDurationHistogramSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusRuleGroupDurationHistogramSeconds) With(
|
||||
extra ...PrometheusRuleGroupDurationHistogramSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupDurationSeconds records the duration of rule group evaluations.
|
||||
type PrometheusRuleGroupDurationSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupDurationSeconds returns a new PrometheusRuleGroupDurationSeconds instrument.
|
||||
func NewPrometheusRuleGroupDurationSeconds() PrometheusRuleGroupDurationSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusRuleGroupDurationSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_rule_group_duration_seconds",
|
||||
Help: "The duration of rule group evaluations.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupDurationSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupDurationSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusRuleGroupDurationSeconds) With(
|
||||
extra ...PrometheusRuleGroupDurationSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupIntervalSeconds records the interval of a rule group.
|
||||
type PrometheusRuleGroupIntervalSeconds struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupIntervalSeconds returns a new PrometheusRuleGroupIntervalSeconds instrument.
|
||||
func NewPrometheusRuleGroupIntervalSeconds() PrometheusRuleGroupIntervalSeconds {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupIntervalSeconds{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_rule_group_interval_seconds",
|
||||
Help: "The interval of a rule group.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupIntervalSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupIntervalSeconds()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupIntervalSeconds() {}
|
||||
|
||||
func (m PrometheusRuleGroupIntervalSeconds) With(
|
||||
extra ...PrometheusRuleGroupIntervalSecondsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupIterationsMissedTotal records the total number of rule group evaluations missed due to slow rule group evaluation.
|
||||
type PrometheusRuleGroupIterationsMissedTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupIterationsMissedTotal returns a new PrometheusRuleGroupIterationsMissedTotal instrument.
|
||||
func NewPrometheusRuleGroupIterationsMissedTotal() PrometheusRuleGroupIterationsMissedTotal {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupIterationsMissedTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_rule_group_iterations_missed_total",
|
||||
Help: "The total number of rule group evaluations missed due to slow rule group evaluation.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupIterationsMissedTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupIterationsMissedTotal()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupIterationsMissedTotal() {}
|
||||
|
||||
func (m PrometheusRuleGroupIterationsMissedTotal) With(
|
||||
extra ...PrometheusRuleGroupIterationsMissedTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupIterationsTotal records the total number of scheduled rule group evaluations.
|
||||
type PrometheusRuleGroupIterationsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupIterationsTotal returns a new PrometheusRuleGroupIterationsTotal instrument.
|
||||
func NewPrometheusRuleGroupIterationsTotal() PrometheusRuleGroupIterationsTotal {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupIterationsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_rule_group_iterations_total",
|
||||
Help: "The total number of scheduled rule group evaluations.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupIterationsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupIterationsTotal()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupIterationsTotal() {}
|
||||
|
||||
func (m PrometheusRuleGroupIterationsTotal) With(
|
||||
extra ...PrometheusRuleGroupIterationsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupLastDurationSeconds records the duration of the last rule group evaluation.
|
||||
type PrometheusRuleGroupLastDurationSeconds struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupLastDurationSeconds returns a new PrometheusRuleGroupLastDurationSeconds instrument.
|
||||
func NewPrometheusRuleGroupLastDurationSeconds() PrometheusRuleGroupLastDurationSeconds {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupLastDurationSeconds{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_rule_group_last_duration_seconds",
|
||||
Help: "The duration of the last rule group evaluation.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupLastDurationSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupLastDurationSeconds()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupLastDurationSeconds() {}
|
||||
|
||||
func (m PrometheusRuleGroupLastDurationSeconds) With(
|
||||
extra ...PrometheusRuleGroupLastDurationSecondsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupLastEvaluationSamples records the number of samples returned during the last rule group evaluation.
|
||||
type PrometheusRuleGroupLastEvaluationSamples struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupLastEvaluationSamples returns a new PrometheusRuleGroupLastEvaluationSamples instrument.
|
||||
func NewPrometheusRuleGroupLastEvaluationSamples() PrometheusRuleGroupLastEvaluationSamples {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupLastEvaluationSamples{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_rule_group_last_evaluation_samples",
|
||||
Help: "The number of samples returned during the last rule group evaluation.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupLastEvaluationSamplesAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupLastEvaluationSamples()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupLastEvaluationSamples() {}
|
||||
|
||||
func (m PrometheusRuleGroupLastEvaluationSamples) With(
|
||||
extra ...PrometheusRuleGroupLastEvaluationSamplesAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupLastEvaluationTimestampSeconds records the timestamp of the last rule group evaluation.
|
||||
type PrometheusRuleGroupLastEvaluationTimestampSeconds struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupLastEvaluationTimestampSeconds returns a new PrometheusRuleGroupLastEvaluationTimestampSeconds instrument.
|
||||
func NewPrometheusRuleGroupLastEvaluationTimestampSeconds() PrometheusRuleGroupLastEvaluationTimestampSeconds {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupLastEvaluationTimestampSeconds{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_rule_group_last_evaluation_timestamp_seconds",
|
||||
Help: "The timestamp of the last rule group evaluation.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupLastEvaluationTimestampSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupLastEvaluationTimestampSeconds()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupLastEvaluationTimestampSeconds() {}
|
||||
|
||||
func (m PrometheusRuleGroupLastEvaluationTimestampSeconds) With(
|
||||
extra ...PrometheusRuleGroupLastEvaluationTimestampSecondsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupLastRestoreDurationSeconds records the duration of the last alert restoration from the ALERTS_FOR_STATE series.
|
||||
type PrometheusRuleGroupLastRestoreDurationSeconds struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupLastRestoreDurationSeconds returns a new PrometheusRuleGroupLastRestoreDurationSeconds instrument.
|
||||
func NewPrometheusRuleGroupLastRestoreDurationSeconds() PrometheusRuleGroupLastRestoreDurationSeconds {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupLastRestoreDurationSeconds{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_rule_group_last_restore_duration_seconds",
|
||||
Help: "The duration of the last alert restoration from the ALERTS_FOR_STATE series.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupLastRestoreDurationSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupLastRestoreDurationSeconds()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupLastRestoreDurationSeconds() {}
|
||||
|
||||
func (m PrometheusRuleGroupLastRestoreDurationSeconds) With(
|
||||
extra ...PrometheusRuleGroupLastRestoreDurationSecondsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupLastRuleDurationSumSeconds records the sum of the durations of all rules in the last rule group evaluation.
|
||||
type PrometheusRuleGroupLastRuleDurationSumSeconds struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupLastRuleDurationSumSeconds returns a new PrometheusRuleGroupLastRuleDurationSumSeconds instrument.
|
||||
func NewPrometheusRuleGroupLastRuleDurationSumSeconds() PrometheusRuleGroupLastRuleDurationSumSeconds {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupLastRuleDurationSumSeconds{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_rule_group_last_rule_duration_sum_seconds",
|
||||
Help: "The sum of the durations of all rules in the last rule group evaluation.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupLastRuleDurationSumSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupLastRuleDurationSumSeconds()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupLastRuleDurationSumSeconds() {}
|
||||
|
||||
func (m PrometheusRuleGroupLastRuleDurationSumSeconds) With(
|
||||
extra ...PrometheusRuleGroupLastRuleDurationSumSecondsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRuleGroupRules records the number of rules in a rule group.
|
||||
type PrometheusRuleGroupRules struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRuleGroupRules returns a new PrometheusRuleGroupRules instrument.
|
||||
func NewPrometheusRuleGroupRules() PrometheusRuleGroupRules {
|
||||
labels := []string{
|
||||
"rule_group",
|
||||
}
|
||||
return PrometheusRuleGroupRules{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_rule_group_rules",
|
||||
Help: "The number of rules in a rule group.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRuleGroupRulesAttr interface {
|
||||
Attribute
|
||||
implPrometheusRuleGroupRules()
|
||||
}
|
||||
|
||||
func (a RuleGroupAttr) implPrometheusRuleGroupRules() {}
|
||||
|
||||
func (m PrometheusRuleGroupRules) With(
|
||||
extra ...PrometheusRuleGroupRulesAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"rule_group": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
334
scrape/semconv/README.md
Normal file
334
scrape/semconv/README.md
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_target_interval_length_histogram_seconds` | histogram | s | Actual intervals between scrapes as a histogram. |
|
||||
| `prometheus_target_interval_length_seconds` | histogram | s | Actual intervals between scrapes. |
|
||||
| `prometheus_target_metadata_cache_bytes` | gauge | By | The number of bytes that are currently used for storing metric metadata in the cache. |
|
||||
| `prometheus_target_metadata_cache_entries` | gauge | {entry} | Total number of metric metadata entries in the cache. |
|
||||
| `prometheus_target_scrape_duration_seconds` | histogram | s | Scrape request latency histogram. |
|
||||
| `prometheus_target_scrape_pool_exceeded_label_limits_total` | counter | {occurrence} | Total number of times scrape pools hit the label limits. |
|
||||
| `prometheus_target_scrape_pool_exceeded_target_limit_total` | counter | {occurrence} | Total number of times scrape pools hit the target limit. |
|
||||
| `prometheus_target_scrape_pool_reloads_failed_total` | counter | {reload} | Total number of failed scrape pool reloads. |
|
||||
| `prometheus_target_scrape_pool_reloads_total` | counter | {reload} | Total number of scrape pool reloads. |
|
||||
| `prometheus_target_scrape_pool_symboltable_items` | gauge | {symbol} | Current number of symbols in the scrape pool symbol table. |
|
||||
| `prometheus_target_scrape_pool_sync_total` | counter | {sync} | Total number of syncs that were executed on a scrape pool. |
|
||||
| `prometheus_target_scrape_pool_target_limit` | gauge | {target} | Maximum number of targets allowed in this scrape pool. |
|
||||
| `prometheus_target_scrape_pool_targets` | gauge | {target} | Current number of targets in this scrape pool. |
|
||||
| `prometheus_target_scrape_pools_failed_total` | counter | {pool} | Total number of scrape pool creations that failed. |
|
||||
| `prometheus_target_scrape_pools_total` | counter | {pool} | Total number of scrape pool creation attempts. |
|
||||
| `prometheus_target_scrapes_cache_flush_forced_total` | counter | {scrape} | Total number of scrapes that forced a complete label cache flush. |
|
||||
| `prometheus_target_scrapes_exceeded_body_size_limit_total` | counter | {scrape} | Total number of scrapes that hit the body size limit. |
|
||||
| `prometheus_target_scrapes_exceeded_native_histogram_bucket_limit_total` | counter | {scrape} | Total number of scrapes that hit the native histogram bucket limit. |
|
||||
| `prometheus_target_scrapes_exceeded_sample_limit_total` | counter | {scrape} | Total number of scrapes that hit the sample limit. |
|
||||
| `prometheus_target_scrapes_exemplar_out_of_order_total` | counter | {exemplar} | Total number of exemplar rejected due to not being out of the expected order. |
|
||||
| `prometheus_target_scrapes_sample_duplicate_timestamp_total` | counter | {sample} | Total number of samples rejected due to duplicate timestamps but different values. |
|
||||
| `prometheus_target_scrapes_sample_out_of_bounds_total` | counter | {sample} | Total number of samples rejected due to timestamp falling outside of the time bounds. |
|
||||
| `prometheus_target_scrapes_sample_out_of_order_total` | counter | {sample} | Total number of samples rejected due to not being out of the expected order. |
|
||||
| `prometheus_target_sync_failed_total` | counter | {sync} | Total number of target sync failures. |
|
||||
| `prometheus_target_sync_length_histogram_seconds` | histogram | s | Actual interval to sync the scrape pool as a histogram. |
|
||||
| `prometheus_target_sync_length_seconds` | histogram | s | Actual interval to sync the scrape pool. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_target_interval_length_histogram_seconds`
|
||||
|
||||
Actual intervals between scrapes as a histogram.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `interval` | string | The configured scrape interval. | 15s, 30s |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_interval_length_seconds`
|
||||
|
||||
Actual intervals between scrapes.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_metadata_cache_bytes`
|
||||
|
||||
The number of bytes that are currently used for storing metric metadata in the cache.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_metadata_cache_entries`
|
||||
|
||||
Total number of metric metadata entries in the cache.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {entry}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_scrape_duration_seconds`
|
||||
|
||||
Scrape request latency histogram.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_exceeded_label_limits_total`
|
||||
|
||||
Total number of times scrape pools hit the label limits.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {occurrence}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_exceeded_target_limit_total`
|
||||
|
||||
Total number of times scrape pools hit the target limit.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {occurrence}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_reloads_failed_total`
|
||||
|
||||
Total number of failed scrape pool reloads.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {reload}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_reloads_total`
|
||||
|
||||
Total number of scrape pool reloads.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {reload}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_symboltable_items`
|
||||
|
||||
Current number of symbols in the scrape pool symbol table.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {symbol}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_sync_total`
|
||||
|
||||
Total number of syncs that were executed on a scrape pool.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sync}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_target_limit`
|
||||
|
||||
Maximum number of targets allowed in this scrape pool.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {target}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pool_targets`
|
||||
|
||||
Current number of targets in this scrape pool.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {target}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pools_failed_total`
|
||||
|
||||
Total number of scrape pool creations that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {pool}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrape_pools_total`
|
||||
|
||||
Total number of scrape pool creation attempts.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {pool}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_cache_flush_forced_total`
|
||||
|
||||
Total number of scrapes that forced a complete label cache flush.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {scrape}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_exceeded_body_size_limit_total`
|
||||
|
||||
Total number of scrapes that hit the body size limit.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {scrape}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_exceeded_native_histogram_bucket_limit_total`
|
||||
|
||||
Total number of scrapes that hit the native histogram bucket limit.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {scrape}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_exceeded_sample_limit_total`
|
||||
|
||||
Total number of scrapes that hit the sample limit.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {scrape}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_exemplar_out_of_order_total`
|
||||
|
||||
Total number of exemplar rejected due to not being out of the expected order.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {exemplar}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_sample_duplicate_timestamp_total`
|
||||
|
||||
Total number of samples rejected due to duplicate timestamps but different values.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_sample_out_of_bounds_total`
|
||||
|
||||
Total number of samples rejected due to timestamp falling outside of the time bounds.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_scrapes_sample_out_of_order_total`
|
||||
|
||||
Total number of samples rejected due to not being out of the expected order.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_target_sync_failed_total`
|
||||
|
||||
Total number of target sync failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sync}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_sync_length_histogram_seconds`
|
||||
|
||||
Actual interval to sync the scrape pool as a histogram.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `scrape_job` | string | The scrape job name. | prometheus, node_exporter |
|
||||
|
||||
|
||||
|
||||
### `prometheus_target_sync_length_seconds`
|
||||
|
||||
Actual interval to sync the scrape pool.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
894
scrape/semconv/metrics.go
Normal file
894
scrape/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,894 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
type IntervalAttr string
|
||||
|
||||
func (a IntervalAttr) ID() string {
|
||||
return "interval"
|
||||
}
|
||||
|
||||
func (a IntervalAttr) Value() string {
|
||||
return string(a)
|
||||
}
|
||||
|
||||
type ScrapeJobAttr string
|
||||
|
||||
func (a ScrapeJobAttr) ID() string {
|
||||
return "scrape_job"
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) Value() string {
|
||||
return string(a)
|
||||
}
|
||||
|
||||
// PrometheusTargetIntervalLengthHistogramSeconds records the actual intervals between scrapes as a histogram.
|
||||
type PrometheusTargetIntervalLengthHistogramSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetIntervalLengthHistogramSeconds returns a new PrometheusTargetIntervalLengthHistogramSeconds instrument.
|
||||
func NewPrometheusTargetIntervalLengthHistogramSeconds() PrometheusTargetIntervalLengthHistogramSeconds {
|
||||
labels := []string{
|
||||
"interval",
|
||||
}
|
||||
return PrometheusTargetIntervalLengthHistogramSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_target_interval_length_histogram_seconds",
|
||||
Help: "Actual intervals between scrapes as a histogram.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetIntervalLengthHistogramSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetIntervalLengthHistogramSeconds()
|
||||
}
|
||||
|
||||
func (a IntervalAttr) implPrometheusTargetIntervalLengthHistogramSeconds() {}
|
||||
|
||||
func (m PrometheusTargetIntervalLengthHistogramSeconds) With(
|
||||
extra ...PrometheusTargetIntervalLengthHistogramSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{
|
||||
"interval": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetIntervalLengthSeconds records the actual intervals between scrapes.
|
||||
type PrometheusTargetIntervalLengthSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetIntervalLengthSeconds returns a new PrometheusTargetIntervalLengthSeconds instrument.
|
||||
func NewPrometheusTargetIntervalLengthSeconds() PrometheusTargetIntervalLengthSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusTargetIntervalLengthSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_target_interval_length_seconds",
|
||||
Help: "Actual intervals between scrapes.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetIntervalLengthSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetIntervalLengthSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetIntervalLengthSeconds) With(
|
||||
extra ...PrometheusTargetIntervalLengthSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetMetadataCacheBytes records the number of bytes that are currently used for storing metric metadata in the cache.
|
||||
type PrometheusTargetMetadataCacheBytes struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetMetadataCacheBytes returns a new PrometheusTargetMetadataCacheBytes instrument.
|
||||
func NewPrometheusTargetMetadataCacheBytes() PrometheusTargetMetadataCacheBytes {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetMetadataCacheBytes{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_target_metadata_cache_bytes",
|
||||
Help: "The number of bytes that are currently used for storing metric metadata in the cache.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetMetadataCacheBytesAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetMetadataCacheBytes()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetMetadataCacheBytes() {}
|
||||
|
||||
func (m PrometheusTargetMetadataCacheBytes) With(
|
||||
extra ...PrometheusTargetMetadataCacheBytesAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetMetadataCacheEntries records the total number of metric metadata entries in the cache.
|
||||
type PrometheusTargetMetadataCacheEntries struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetMetadataCacheEntries returns a new PrometheusTargetMetadataCacheEntries instrument.
|
||||
func NewPrometheusTargetMetadataCacheEntries() PrometheusTargetMetadataCacheEntries {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetMetadataCacheEntries{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_target_metadata_cache_entries",
|
||||
Help: "Total number of metric metadata entries in the cache.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetMetadataCacheEntriesAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetMetadataCacheEntries()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetMetadataCacheEntries() {}
|
||||
|
||||
func (m PrometheusTargetMetadataCacheEntries) With(
|
||||
extra ...PrometheusTargetMetadataCacheEntriesAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapeDurationSeconds records the scrape request latency histogram.
|
||||
type PrometheusTargetScrapeDurationSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapeDurationSeconds returns a new PrometheusTargetScrapeDurationSeconds instrument.
|
||||
func NewPrometheusTargetScrapeDurationSeconds() PrometheusTargetScrapeDurationSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapeDurationSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_target_scrape_duration_seconds",
|
||||
Help: "Scrape request latency histogram.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapeDurationSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapeDurationSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapeDurationSeconds) With(
|
||||
extra ...PrometheusTargetScrapeDurationSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolExceededLabelLimitsTotal records the total number of times scrape pools hit the label limits.
|
||||
type PrometheusTargetScrapePoolExceededLabelLimitsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolExceededLabelLimitsTotal returns a new PrometheusTargetScrapePoolExceededLabelLimitsTotal instrument.
|
||||
func NewPrometheusTargetScrapePoolExceededLabelLimitsTotal() PrometheusTargetScrapePoolExceededLabelLimitsTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapePoolExceededLabelLimitsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrape_pool_exceeded_label_limits_total",
|
||||
Help: "Total number of times scrape pools hit the label limits.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolExceededLabelLimitsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolExceededLabelLimitsTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapePoolExceededLabelLimitsTotal) With(
|
||||
extra ...PrometheusTargetScrapePoolExceededLabelLimitsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolExceededTargetLimitTotal records the total number of times scrape pools hit the target limit.
|
||||
type PrometheusTargetScrapePoolExceededTargetLimitTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolExceededTargetLimitTotal returns a new PrometheusTargetScrapePoolExceededTargetLimitTotal instrument.
|
||||
func NewPrometheusTargetScrapePoolExceededTargetLimitTotal() PrometheusTargetScrapePoolExceededTargetLimitTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapePoolExceededTargetLimitTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrape_pool_exceeded_target_limit_total",
|
||||
Help: "Total number of times scrape pools hit the target limit.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolExceededTargetLimitTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolExceededTargetLimitTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapePoolExceededTargetLimitTotal) With(
|
||||
extra ...PrometheusTargetScrapePoolExceededTargetLimitTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolReloadsFailedTotal records the total number of failed scrape pool reloads.
|
||||
type PrometheusTargetScrapePoolReloadsFailedTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolReloadsFailedTotal returns a new PrometheusTargetScrapePoolReloadsFailedTotal instrument.
|
||||
func NewPrometheusTargetScrapePoolReloadsFailedTotal() PrometheusTargetScrapePoolReloadsFailedTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapePoolReloadsFailedTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrape_pool_reloads_failed_total",
|
||||
Help: "Total number of failed scrape pool reloads.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolReloadsFailedTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolReloadsFailedTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapePoolReloadsFailedTotal) With(
|
||||
extra ...PrometheusTargetScrapePoolReloadsFailedTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolReloadsTotal records the total number of scrape pool reloads.
|
||||
type PrometheusTargetScrapePoolReloadsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolReloadsTotal returns a new PrometheusTargetScrapePoolReloadsTotal instrument.
|
||||
func NewPrometheusTargetScrapePoolReloadsTotal() PrometheusTargetScrapePoolReloadsTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapePoolReloadsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrape_pool_reloads_total",
|
||||
Help: "Total number of scrape pool reloads.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolReloadsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolReloadsTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapePoolReloadsTotal) With(
|
||||
extra ...PrometheusTargetScrapePoolReloadsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolSymboltableItems records the current number of symbols in the scrape pool symbol table.
|
||||
type PrometheusTargetScrapePoolSymboltableItems struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolSymboltableItems returns a new PrometheusTargetScrapePoolSymboltableItems instrument.
|
||||
func NewPrometheusTargetScrapePoolSymboltableItems() PrometheusTargetScrapePoolSymboltableItems {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetScrapePoolSymboltableItems{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_target_scrape_pool_symboltable_items",
|
||||
Help: "Current number of symbols in the scrape pool symbol table.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolSymboltableItemsAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolSymboltableItems()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetScrapePoolSymboltableItems() {}
|
||||
|
||||
func (m PrometheusTargetScrapePoolSymboltableItems) With(
|
||||
extra ...PrometheusTargetScrapePoolSymboltableItemsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolSyncTotal records the total number of syncs that were executed on a scrape pool.
|
||||
type PrometheusTargetScrapePoolSyncTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolSyncTotal returns a new PrometheusTargetScrapePoolSyncTotal instrument.
|
||||
func NewPrometheusTargetScrapePoolSyncTotal() PrometheusTargetScrapePoolSyncTotal {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetScrapePoolSyncTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrape_pool_sync_total",
|
||||
Help: "Total number of syncs that were executed on a scrape pool.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolSyncTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolSyncTotal()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetScrapePoolSyncTotal() {}
|
||||
|
||||
func (m PrometheusTargetScrapePoolSyncTotal) With(
|
||||
extra ...PrometheusTargetScrapePoolSyncTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolTargetLimit records the maximum number of targets allowed in this scrape pool.
|
||||
type PrometheusTargetScrapePoolTargetLimit struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolTargetLimit returns a new PrometheusTargetScrapePoolTargetLimit instrument.
|
||||
func NewPrometheusTargetScrapePoolTargetLimit() PrometheusTargetScrapePoolTargetLimit {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetScrapePoolTargetLimit{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_target_scrape_pool_target_limit",
|
||||
Help: "Maximum number of targets allowed in this scrape pool.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolTargetLimitAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolTargetLimit()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetScrapePoolTargetLimit() {}
|
||||
|
||||
func (m PrometheusTargetScrapePoolTargetLimit) With(
|
||||
extra ...PrometheusTargetScrapePoolTargetLimitAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolTargets records the current number of targets in this scrape pool.
|
||||
type PrometheusTargetScrapePoolTargets struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolTargets returns a new PrometheusTargetScrapePoolTargets instrument.
|
||||
func NewPrometheusTargetScrapePoolTargets() PrometheusTargetScrapePoolTargets {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetScrapePoolTargets{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_target_scrape_pool_targets",
|
||||
Help: "Current number of targets in this scrape pool.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolTargetsAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolTargets()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetScrapePoolTargets() {}
|
||||
|
||||
func (m PrometheusTargetScrapePoolTargets) With(
|
||||
extra ...PrometheusTargetScrapePoolTargetsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolsFailedTotal records the total number of scrape pool creations that failed.
|
||||
type PrometheusTargetScrapePoolsFailedTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolsFailedTotal returns a new PrometheusTargetScrapePoolsFailedTotal instrument.
|
||||
func NewPrometheusTargetScrapePoolsFailedTotal() PrometheusTargetScrapePoolsFailedTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapePoolsFailedTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrape_pools_failed_total",
|
||||
Help: "Total number of scrape pool creations that failed.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolsFailedTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolsFailedTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapePoolsFailedTotal) With(
|
||||
extra ...PrometheusTargetScrapePoolsFailedTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapePoolsTotal records the total number of scrape pool creation attempts.
|
||||
type PrometheusTargetScrapePoolsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapePoolsTotal returns a new PrometheusTargetScrapePoolsTotal instrument.
|
||||
func NewPrometheusTargetScrapePoolsTotal() PrometheusTargetScrapePoolsTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapePoolsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrape_pools_total",
|
||||
Help: "Total number of scrape pool creation attempts.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapePoolsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapePoolsTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapePoolsTotal) With(
|
||||
extra ...PrometheusTargetScrapePoolsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesCacheFlushForcedTotal records the total number of scrapes that forced a complete label cache flush.
|
||||
type PrometheusTargetScrapesCacheFlushForcedTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesCacheFlushForcedTotal returns a new PrometheusTargetScrapesCacheFlushForcedTotal instrument.
|
||||
func NewPrometheusTargetScrapesCacheFlushForcedTotal() PrometheusTargetScrapesCacheFlushForcedTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesCacheFlushForcedTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_cache_flush_forced_total",
|
||||
Help: "Total number of scrapes that forced a complete label cache flush.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesCacheFlushForcedTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesCacheFlushForcedTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesCacheFlushForcedTotal) With(
|
||||
extra ...PrometheusTargetScrapesCacheFlushForcedTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesExceededBodySizeLimitTotal records the total number of scrapes that hit the body size limit.
|
||||
type PrometheusTargetScrapesExceededBodySizeLimitTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesExceededBodySizeLimitTotal returns a new PrometheusTargetScrapesExceededBodySizeLimitTotal instrument.
|
||||
func NewPrometheusTargetScrapesExceededBodySizeLimitTotal() PrometheusTargetScrapesExceededBodySizeLimitTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesExceededBodySizeLimitTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_exceeded_body_size_limit_total",
|
||||
Help: "Total number of scrapes that hit the body size limit.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesExceededBodySizeLimitTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesExceededBodySizeLimitTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesExceededBodySizeLimitTotal) With(
|
||||
extra ...PrometheusTargetScrapesExceededBodySizeLimitTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal records the total number of scrapes that hit the native histogram bucket limit.
|
||||
type PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal returns a new PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal instrument.
|
||||
func NewPrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal() PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_exceeded_native_histogram_bucket_limit_total",
|
||||
Help: "Total number of scrapes that hit the native histogram bucket limit.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotal) With(
|
||||
extra ...PrometheusTargetScrapesExceededNativeHistogramBucketLimitTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesExceededSampleLimitTotal records the total number of scrapes that hit the sample limit.
|
||||
type PrometheusTargetScrapesExceededSampleLimitTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesExceededSampleLimitTotal returns a new PrometheusTargetScrapesExceededSampleLimitTotal instrument.
|
||||
func NewPrometheusTargetScrapesExceededSampleLimitTotal() PrometheusTargetScrapesExceededSampleLimitTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesExceededSampleLimitTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_exceeded_sample_limit_total",
|
||||
Help: "Total number of scrapes that hit the sample limit.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesExceededSampleLimitTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesExceededSampleLimitTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesExceededSampleLimitTotal) With(
|
||||
extra ...PrometheusTargetScrapesExceededSampleLimitTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesExemplarOutOfOrderTotal records the total number of exemplar rejected due to not being out of the expected order.
|
||||
type PrometheusTargetScrapesExemplarOutOfOrderTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesExemplarOutOfOrderTotal returns a new PrometheusTargetScrapesExemplarOutOfOrderTotal instrument.
|
||||
func NewPrometheusTargetScrapesExemplarOutOfOrderTotal() PrometheusTargetScrapesExemplarOutOfOrderTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesExemplarOutOfOrderTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_exemplar_out_of_order_total",
|
||||
Help: "Total number of exemplar rejected due to not being out of the expected order.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesExemplarOutOfOrderTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesExemplarOutOfOrderTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesExemplarOutOfOrderTotal) With(
|
||||
extra ...PrometheusTargetScrapesExemplarOutOfOrderTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesSampleDuplicateTimestampTotal records the total number of samples rejected due to duplicate timestamps but different values.
|
||||
type PrometheusTargetScrapesSampleDuplicateTimestampTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesSampleDuplicateTimestampTotal returns a new PrometheusTargetScrapesSampleDuplicateTimestampTotal instrument.
|
||||
func NewPrometheusTargetScrapesSampleDuplicateTimestampTotal() PrometheusTargetScrapesSampleDuplicateTimestampTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesSampleDuplicateTimestampTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_sample_duplicate_timestamp_total",
|
||||
Help: "Total number of samples rejected due to duplicate timestamps but different values.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesSampleDuplicateTimestampTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesSampleDuplicateTimestampTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesSampleDuplicateTimestampTotal) With(
|
||||
extra ...PrometheusTargetScrapesSampleDuplicateTimestampTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesSampleOutOfBoundsTotal records the total number of samples rejected due to timestamp falling outside of the time bounds.
|
||||
type PrometheusTargetScrapesSampleOutOfBoundsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesSampleOutOfBoundsTotal returns a new PrometheusTargetScrapesSampleOutOfBoundsTotal instrument.
|
||||
func NewPrometheusTargetScrapesSampleOutOfBoundsTotal() PrometheusTargetScrapesSampleOutOfBoundsTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesSampleOutOfBoundsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_sample_out_of_bounds_total",
|
||||
Help: "Total number of samples rejected due to timestamp falling outside of the time bounds.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesSampleOutOfBoundsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesSampleOutOfBoundsTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesSampleOutOfBoundsTotal) With(
|
||||
extra ...PrometheusTargetScrapesSampleOutOfBoundsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetScrapesSampleOutOfOrderTotal records the total number of samples rejected due to not being out of the expected order.
|
||||
type PrometheusTargetScrapesSampleOutOfOrderTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetScrapesSampleOutOfOrderTotal returns a new PrometheusTargetScrapesSampleOutOfOrderTotal instrument.
|
||||
func NewPrometheusTargetScrapesSampleOutOfOrderTotal() PrometheusTargetScrapesSampleOutOfOrderTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTargetScrapesSampleOutOfOrderTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_scrapes_sample_out_of_order_total",
|
||||
Help: "Total number of samples rejected due to not being out of the expected order.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetScrapesSampleOutOfOrderTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetScrapesSampleOutOfOrderTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetScrapesSampleOutOfOrderTotal) With(
|
||||
extra ...PrometheusTargetScrapesSampleOutOfOrderTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetSyncFailedTotal records the total number of target sync failures.
|
||||
type PrometheusTargetSyncFailedTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetSyncFailedTotal returns a new PrometheusTargetSyncFailedTotal instrument.
|
||||
func NewPrometheusTargetSyncFailedTotal() PrometheusTargetSyncFailedTotal {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetSyncFailedTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_target_sync_failed_total",
|
||||
Help: "Total number of target sync failures.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetSyncFailedTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetSyncFailedTotal()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetSyncFailedTotal() {}
|
||||
|
||||
func (m PrometheusTargetSyncFailedTotal) With(
|
||||
extra ...PrometheusTargetSyncFailedTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetSyncLengthHistogramSeconds records the actual interval to sync the scrape pool as a histogram.
|
||||
type PrometheusTargetSyncLengthHistogramSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetSyncLengthHistogramSeconds returns a new PrometheusTargetSyncLengthHistogramSeconds instrument.
|
||||
func NewPrometheusTargetSyncLengthHistogramSeconds() PrometheusTargetSyncLengthHistogramSeconds {
|
||||
labels := []string{
|
||||
"scrape_job",
|
||||
}
|
||||
return PrometheusTargetSyncLengthHistogramSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_target_sync_length_histogram_seconds",
|
||||
Help: "Actual interval to sync the scrape pool as a histogram.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetSyncLengthHistogramSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetSyncLengthHistogramSeconds()
|
||||
}
|
||||
|
||||
func (a ScrapeJobAttr) implPrometheusTargetSyncLengthHistogramSeconds() {}
|
||||
|
||||
func (m PrometheusTargetSyncLengthHistogramSeconds) With(
|
||||
extra ...PrometheusTargetSyncLengthHistogramSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{
|
||||
"scrape_job": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTargetSyncLengthSeconds records the actual interval to sync the scrape pool.
|
||||
type PrometheusTargetSyncLengthSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusTargetSyncLengthSeconds returns a new PrometheusTargetSyncLengthSeconds instrument.
|
||||
func NewPrometheusTargetSyncLengthSeconds() PrometheusTargetSyncLengthSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusTargetSyncLengthSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_target_sync_length_seconds",
|
||||
Help: "Actual interval to sync the scrape pool.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTargetSyncLengthSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusTargetSyncLengthSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusTargetSyncLengthSeconds) With(
|
||||
extra ...PrometheusTargetSyncLengthSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
71
storage/remote/semconv/README.md
Normal file
71
storage/remote/semconv/README.md
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_remote_read_handler_queries` | gauge | {query} | The number of in-flight remote read queries. |
|
||||
| `prometheus_remote_storage_exemplars_in_total` | counter | {exemplar} | Exemplars in to remote storage, compare to determine dropped exemplars. |
|
||||
| `prometheus_remote_storage_highest_timestamp_in_seconds` | gauge | s | Highest timestamp that has come into the remote storage via the Appender interface. |
|
||||
| `prometheus_remote_storage_histograms_in_total` | counter | {histogram} | Histograms in to remote storage, compare to determine dropped histograms. |
|
||||
| `prometheus_remote_storage_samples_in_total` | counter | {sample} | Samples in to remote storage, compare to determine dropped samples. |
|
||||
| `prometheus_remote_storage_string_interner_zero_reference_releases_total` | counter | {release} | The number of times release has been called for strings that are not interned. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_remote_read_handler_queries`
|
||||
|
||||
The number of in-flight remote read queries.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {query}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_remote_storage_exemplars_in_total`
|
||||
|
||||
Exemplars in to remote storage, compare to determine dropped exemplars.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {exemplar}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_remote_storage_highest_timestamp_in_seconds`
|
||||
|
||||
Highest timestamp that has come into the remote storage via the Appender interface.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_remote_storage_histograms_in_total`
|
||||
|
||||
Histograms in to remote storage, compare to determine dropped histograms.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {histogram}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_remote_storage_samples_in_total`
|
||||
|
||||
Samples in to remote storage, compare to determine dropped samples.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_remote_storage_string_interner_zero_reference_releases_total`
|
||||
|
||||
The number of times release has been called for strings that are not interned.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {release}
|
||||
- **Stability:** development
|
||||
201
storage/remote/semconv/metrics.go
Normal file
201
storage/remote/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
|
||||
// PrometheusRemoteReadHandlerQueries records the number of in-flight remote read queries.
|
||||
type PrometheusRemoteReadHandlerQueries struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRemoteReadHandlerQueries returns a new PrometheusRemoteReadHandlerQueries instrument.
|
||||
func NewPrometheusRemoteReadHandlerQueries() PrometheusRemoteReadHandlerQueries {
|
||||
labels := []string{}
|
||||
return PrometheusRemoteReadHandlerQueries{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_remote_read_handler_queries",
|
||||
Help: "The number of in-flight remote read queries.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRemoteReadHandlerQueriesAttr interface {
|
||||
Attribute
|
||||
implPrometheusRemoteReadHandlerQueries()
|
||||
}
|
||||
|
||||
func (m PrometheusRemoteReadHandlerQueries) With(
|
||||
extra ...PrometheusRemoteReadHandlerQueriesAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRemoteStorageExemplarsInTotal records the exemplars in to remote storage, compare to determine dropped exemplars.
|
||||
type PrometheusRemoteStorageExemplarsInTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRemoteStorageExemplarsInTotal returns a new PrometheusRemoteStorageExemplarsInTotal instrument.
|
||||
func NewPrometheusRemoteStorageExemplarsInTotal() PrometheusRemoteStorageExemplarsInTotal {
|
||||
labels := []string{}
|
||||
return PrometheusRemoteStorageExemplarsInTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_remote_storage_exemplars_in_total",
|
||||
Help: "Exemplars in to remote storage, compare to determine dropped exemplars.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRemoteStorageExemplarsInTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRemoteStorageExemplarsInTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusRemoteStorageExemplarsInTotal) With(
|
||||
extra ...PrometheusRemoteStorageExemplarsInTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRemoteStorageHighestTimestampInSeconds records the highest timestamp that has come into the remote storage via the Appender interface.
|
||||
type PrometheusRemoteStorageHighestTimestampInSeconds struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusRemoteStorageHighestTimestampInSeconds returns a new PrometheusRemoteStorageHighestTimestampInSeconds instrument.
|
||||
func NewPrometheusRemoteStorageHighestTimestampInSeconds() PrometheusRemoteStorageHighestTimestampInSeconds {
|
||||
labels := []string{}
|
||||
return PrometheusRemoteStorageHighestTimestampInSeconds{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_remote_storage_highest_timestamp_in_seconds",
|
||||
Help: "Highest timestamp that has come into the remote storage via the Appender interface.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRemoteStorageHighestTimestampInSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusRemoteStorageHighestTimestampInSeconds()
|
||||
}
|
||||
|
||||
func (m PrometheusRemoteStorageHighestTimestampInSeconds) With(
|
||||
extra ...PrometheusRemoteStorageHighestTimestampInSecondsAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRemoteStorageHistogramsInTotal records the histograms in to remote storage, compare to determine dropped histograms.
|
||||
type PrometheusRemoteStorageHistogramsInTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRemoteStorageHistogramsInTotal returns a new PrometheusRemoteStorageHistogramsInTotal instrument.
|
||||
func NewPrometheusRemoteStorageHistogramsInTotal() PrometheusRemoteStorageHistogramsInTotal {
|
||||
labels := []string{}
|
||||
return PrometheusRemoteStorageHistogramsInTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_remote_storage_histograms_in_total",
|
||||
Help: "Histograms in to remote storage, compare to determine dropped histograms.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRemoteStorageHistogramsInTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRemoteStorageHistogramsInTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusRemoteStorageHistogramsInTotal) With(
|
||||
extra ...PrometheusRemoteStorageHistogramsInTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRemoteStorageSamplesInTotal records the samples in to remote storage, compare to determine dropped samples.
|
||||
type PrometheusRemoteStorageSamplesInTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRemoteStorageSamplesInTotal returns a new PrometheusRemoteStorageSamplesInTotal instrument.
|
||||
func NewPrometheusRemoteStorageSamplesInTotal() PrometheusRemoteStorageSamplesInTotal {
|
||||
labels := []string{}
|
||||
return PrometheusRemoteStorageSamplesInTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_remote_storage_samples_in_total",
|
||||
Help: "Samples in to remote storage, compare to determine dropped samples.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRemoteStorageSamplesInTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRemoteStorageSamplesInTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusRemoteStorageSamplesInTotal) With(
|
||||
extra ...PrometheusRemoteStorageSamplesInTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal records the number of times release has been called for strings that are not interned.
|
||||
type PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal returns a new PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal instrument.
|
||||
func NewPrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal() PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal {
|
||||
labels := []string{}
|
||||
return PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_remote_storage_string_interner_zero_reference_releases_total",
|
||||
Help: "The number of times release has been called for strings that are not interned.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotal) With(
|
||||
extra ...PrometheusRemoteStorageStringInternerZeroReferenceReleasesTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
31
template/semconv/README.md
Normal file
31
template/semconv/README.md
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_template_text_expansion_failures_total` | counter | {failure} | The total number of template text expansion failures. |
|
||||
| `prometheus_template_text_expansions_total` | counter | {expansion} | The total number of template text expansions. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_template_text_expansion_failures_total`
|
||||
|
||||
The total number of template text expansion failures.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {failure}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_template_text_expansions_total`
|
||||
|
||||
The total number of template text expansions.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {expansion}
|
||||
- **Stability:** development
|
||||
77
template/semconv/metrics.go
Normal file
77
template/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
|
||||
// PrometheusTemplateTextExpansionFailuresTotal records the total number of template text expansion failures.
|
||||
type PrometheusTemplateTextExpansionFailuresTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTemplateTextExpansionFailuresTotal returns a new PrometheusTemplateTextExpansionFailuresTotal instrument.
|
||||
func NewPrometheusTemplateTextExpansionFailuresTotal() PrometheusTemplateTextExpansionFailuresTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTemplateTextExpansionFailuresTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_template_text_expansion_failures_total",
|
||||
Help: "The total number of template text expansion failures.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTemplateTextExpansionFailuresTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTemplateTextExpansionFailuresTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTemplateTextExpansionFailuresTotal) With(
|
||||
extra ...PrometheusTemplateTextExpansionFailuresTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusTemplateTextExpansionsTotal records the total number of template text expansions.
|
||||
type PrometheusTemplateTextExpansionsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusTemplateTextExpansionsTotal returns a new PrometheusTemplateTextExpansionsTotal instrument.
|
||||
func NewPrometheusTemplateTextExpansionsTotal() PrometheusTemplateTextExpansionsTotal {
|
||||
labels := []string{}
|
||||
return PrometheusTemplateTextExpansionsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_template_text_expansions_total",
|
||||
Help: "The total number of template text expansions.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusTemplateTextExpansionsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusTemplateTextExpansionsTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusTemplateTextExpansionsTotal) With(
|
||||
extra ...PrometheusTemplateTextExpansionsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
903
tsdb/semconv/README.md
Normal file
903
tsdb/semconv/README.md
Normal file
|
|
@ -0,0 +1,903 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_tsdb_blocks_loaded` | gauge | {block} | Number of currently loaded data blocks. |
|
||||
| `prometheus_tsdb_checkpoint_creations_failed_total` | counter | {checkpoint} | Total number of checkpoint creations that failed. |
|
||||
| `prometheus_tsdb_checkpoint_creations_total` | counter | {checkpoint} | Total number of checkpoint creations attempted. |
|
||||
| `prometheus_tsdb_checkpoint_deletions_failed_total` | counter | {checkpoint} | Total number of checkpoint deletions that failed. |
|
||||
| `prometheus_tsdb_checkpoint_deletions_total` | counter | {checkpoint} | Total number of checkpoint deletions attempted. |
|
||||
| `prometheus_tsdb_clean_start` | gauge | 1 | Set to 1 if the TSDB was clean at startup, 0 otherwise. |
|
||||
| `prometheus_tsdb_compaction_chunk_range_seconds` | histogram | s | Final time range of chunks on their first compaction. |
|
||||
| `prometheus_tsdb_compaction_chunk_samples` | histogram | {sample} | Final number of samples on their first compaction. |
|
||||
| `prometheus_tsdb_compaction_chunk_size_bytes` | histogram | By | Final size of chunks on their first compaction. |
|
||||
| `prometheus_tsdb_compaction_duration_seconds` | histogram | s | Duration of compaction runs. |
|
||||
| `prometheus_tsdb_compaction_populating_block` | gauge | 1 | Set to 1 when a block is being written to the disk. |
|
||||
| `prometheus_tsdb_compactions_failed_total` | counter | {compaction} | Total number of compactions that failed. |
|
||||
| `prometheus_tsdb_compactions_skipped_total` | counter | {compaction} | Total number of skipped compactions due to overlap. |
|
||||
| `prometheus_tsdb_compactions_total` | counter | {compaction} | Total number of compactions that were executed. |
|
||||
| `prometheus_tsdb_compactions_triggered_total` | counter | {compaction} | Total number of triggered compactions. |
|
||||
| `prometheus_tsdb_data_replay_duration_seconds` | gauge | s | Time taken to replay the data on disk. |
|
||||
| `prometheus_tsdb_exemplar_exemplars_appended_total` | counter | {exemplar} | Total number of appended exemplars. |
|
||||
| `prometheus_tsdb_exemplar_exemplars_in_storage` | gauge | {exemplar} | Number of exemplars currently in circular storage. |
|
||||
| `prometheus_tsdb_exemplar_last_exemplars_timestamp_seconds` | gauge | s | The timestamp of the oldest exemplar stored in circular storage. |
|
||||
| `prometheus_tsdb_exemplar_max_exemplars` | gauge | {exemplar} | Total number of exemplars the exemplar storage can store. |
|
||||
| `prometheus_tsdb_exemplar_out_of_order_exemplars_total` | counter | {exemplar} | Total number of out-of-order exemplar ingestion failed attempts. |
|
||||
| `prometheus_tsdb_exemplar_series_with_exemplars_in_storage` | gauge | {series} | Number of series with exemplars currently in circular storage. |
|
||||
| `prometheus_tsdb_head_active_appenders` | gauge | {appender} | Number of currently active appender transactions. |
|
||||
| `prometheus_tsdb_head_chunks` | gauge | {chunk} | Total number of chunks in the head block. |
|
||||
| `prometheus_tsdb_head_chunks_created_total` | counter | {chunk} | Total number of chunks created in the head block. |
|
||||
| `prometheus_tsdb_head_chunks_removed_total` | counter | {chunk} | Total number of chunks removed from the head block. |
|
||||
| `prometheus_tsdb_head_chunks_storage_size_bytes` | gauge | By | Size of the chunks_head directory. |
|
||||
| `prometheus_tsdb_head_gc_duration_seconds` | histogram | s | Runtime of garbage collection in the head block. |
|
||||
| `prometheus_tsdb_head_max_time` | gauge | 1 | Maximum timestamp of the head block. |
|
||||
| `prometheus_tsdb_head_max_time_seconds` | gauge | s | Maximum timestamp of the head block in seconds. |
|
||||
| `prometheus_tsdb_head_min_time` | gauge | 1 | Minimum timestamp of the head block. |
|
||||
| `prometheus_tsdb_head_min_time_seconds` | gauge | s | Minimum timestamp of the head block in seconds. |
|
||||
| `prometheus_tsdb_head_out_of_order_samples_appended_total` | counter | {sample} | Total number of appended out-of-order samples. |
|
||||
| `prometheus_tsdb_head_samples_appended_total` | counter | {sample} | Total number of appended samples. |
|
||||
| `prometheus_tsdb_head_series` | gauge | {series} | Total number of series in the head block. |
|
||||
| `prometheus_tsdb_head_series_created_total` | counter | {series} | Total number of series created in the head block. |
|
||||
| `prometheus_tsdb_head_series_not_found_total` | counter | {request} | Total number of requests for series that were not found. |
|
||||
| `prometheus_tsdb_head_series_removed_total` | counter | {series} | Total number of series removed from the head block. |
|
||||
| `prometheus_tsdb_head_stale_series` | gauge | {series} | Number of stale series in the head block. |
|
||||
| `prometheus_tsdb_head_truncations_failed_total` | counter | {truncation} | Total number of head truncations that failed. |
|
||||
| `prometheus_tsdb_head_truncations_total` | counter | {truncation} | Total number of head truncations attempted. |
|
||||
| `prometheus_tsdb_isolation_high_watermark` | gauge | 1 | The isolation high watermark. |
|
||||
| `prometheus_tsdb_isolation_low_watermark` | gauge | 1 | The isolation low watermark. |
|
||||
| `prometheus_tsdb_lowest_timestamp` | gauge | 1 | Lowest timestamp value stored in the database. |
|
||||
| `prometheus_tsdb_lowest_timestamp_seconds` | gauge | s | Lowest timestamp value stored in the database in seconds. |
|
||||
| `prometheus_tsdb_mmap_chunk_corruptions_total` | counter | {corruption} | Total number of memory-mapped chunk corruptions. |
|
||||
| `prometheus_tsdb_mmap_chunks_total` | counter | {chunk} | Total number of memory-mapped chunks. |
|
||||
| `prometheus_tsdb_out_of_bound_samples_total` | counter | {sample} | Total number of out-of-bound samples ingestion failed attempts. |
|
||||
| `prometheus_tsdb_out_of_order_samples_total` | counter | {sample} | Total number of out-of-order samples ingestion failed attempts. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_completed_pages_total` | counter | {page} | Total number of completed WBL pages for out-of-order samples. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_fsync_duration_seconds` | histogram | s | Duration of WBL fsync for out-of-order samples. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_page_flushes_total` | counter | {flush} | Total number of WBL page flushes for out-of-order samples. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_record_part_writes_total` | counter | {write} | Total number of WBL record part writes for out-of-order samples. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_record_parts_bytes_written_total` | counter | By | Total bytes written to WBL record parts for out-of-order samples. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_segment_current` | gauge | {segment} | Current out-of-order WBL segment. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_storage_size_bytes` | gauge | By | Size of the out-of-order WBL storage. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_truncations_failed_total` | counter | {truncation} | Total number of out-of-order WBL truncations that failed. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_truncations_total` | counter | {truncation} | Total number of out-of-order WBL truncations. |
|
||||
| `prometheus_tsdb_out_of_order_wbl_writes_failed_total` | counter | {write} | Total number of out-of-order WBL writes that failed. |
|
||||
| `prometheus_tsdb_reloads_failures_total` | counter | {reload} | Number of times the database reloads failed. |
|
||||
| `prometheus_tsdb_reloads_total` | counter | {reload} | Number of times the database reloads. |
|
||||
| `prometheus_tsdb_retention_limit_bytes` | gauge | By | Maximum number of bytes to be retained in the TSDB. |
|
||||
| `prometheus_tsdb_retention_limit_seconds` | gauge | s | Maximum age in seconds for samples to be retained in the TSDB. |
|
||||
| `prometheus_tsdb_sample_ooo_delta` | histogram | s | Delta in seconds between the time when an out-of-order sample was ingested and the latest sample in the chunk. |
|
||||
| `prometheus_tsdb_size_retentions_total` | counter | {retention} | Number of times that blocks were deleted because the maximum number of bytes was exceeded. |
|
||||
| `prometheus_tsdb_snapshot_replay_error_total` | counter | {error} | Total number of snapshot replay errors. |
|
||||
| `prometheus_tsdb_storage_blocks_bytes` | gauge | By | The number of bytes that are currently used for local storage by all blocks. |
|
||||
| `prometheus_tsdb_symbol_table_size_bytes` | gauge | By | Size of the symbol table in bytes. |
|
||||
| `prometheus_tsdb_time_retentions_total` | counter | {retention} | Number of times that blocks were deleted because the maximum time limit was exceeded. |
|
||||
| `prometheus_tsdb_tombstone_cleanup_seconds` | histogram | s | Time taken to clean up tombstones. |
|
||||
| `prometheus_tsdb_too_old_samples_total` | counter | {sample} | Total number of samples that were too old to be ingested. |
|
||||
| `prometheus_tsdb_vertical_compactions_total` | counter | {compaction} | Total number of compactions done on overlapping blocks. |
|
||||
| `prometheus_tsdb_wal_completed_pages_total` | counter | {page} | Total number of completed WAL pages. |
|
||||
| `prometheus_tsdb_wal_corruptions_total` | counter | {corruption} | Total number of WAL corruptions. |
|
||||
| `prometheus_tsdb_wal_fsync_duration_seconds` | histogram | s | Duration of WAL fsync. |
|
||||
| `prometheus_tsdb_wal_page_flushes_total` | counter | {flush} | Total number of WAL page flushes. |
|
||||
| `prometheus_tsdb_wal_record_bytes_saved_total` | counter | By | Total bytes saved by WAL record compression. |
|
||||
| `prometheus_tsdb_wal_record_part_writes_total` | counter | {write} | Total number of WAL record part writes. |
|
||||
| `prometheus_tsdb_wal_record_parts_bytes_written_total` | counter | By | Total bytes written to WAL record parts. |
|
||||
| `prometheus_tsdb_wal_segment_current` | gauge | {segment} | Current WAL segment. |
|
||||
| `prometheus_tsdb_wal_storage_size_bytes` | gauge | By | Size of the WAL storage. |
|
||||
| `prometheus_tsdb_wal_truncate_duration_seconds` | histogram | s | Duration of WAL truncation. |
|
||||
| `prometheus_tsdb_wal_truncations_failed_total` | counter | {truncation} | Total number of WAL truncations that failed. |
|
||||
| `prometheus_tsdb_wal_truncations_total` | counter | {truncation} | Total number of WAL truncations. |
|
||||
| `prometheus_tsdb_wal_writes_failed_total` | counter | {write} | Total number of WAL writes that failed. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_tsdb_blocks_loaded`
|
||||
|
||||
Number of currently loaded data blocks.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {block}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_checkpoint_creations_failed_total`
|
||||
|
||||
Total number of checkpoint creations that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {checkpoint}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_checkpoint_creations_total`
|
||||
|
||||
Total number of checkpoint creations attempted.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {checkpoint}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_checkpoint_deletions_failed_total`
|
||||
|
||||
Total number of checkpoint deletions that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {checkpoint}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_checkpoint_deletions_total`
|
||||
|
||||
Total number of checkpoint deletions attempted.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {checkpoint}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_clean_start`
|
||||
|
||||
Set to 1 if the TSDB was clean at startup, 0 otherwise.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compaction_chunk_range_seconds`
|
||||
|
||||
Final time range of chunks on their first compaction.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compaction_chunk_samples`
|
||||
|
||||
Final number of samples on their first compaction.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compaction_chunk_size_bytes`
|
||||
|
||||
Final size of chunks on their first compaction.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compaction_duration_seconds`
|
||||
|
||||
Duration of compaction runs.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compaction_populating_block`
|
||||
|
||||
Set to 1 when a block is being written to the disk.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compactions_failed_total`
|
||||
|
||||
Total number of compactions that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {compaction}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compactions_skipped_total`
|
||||
|
||||
Total number of skipped compactions due to overlap.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {compaction}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compactions_total`
|
||||
|
||||
Total number of compactions that were executed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {compaction}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_compactions_triggered_total`
|
||||
|
||||
Total number of triggered compactions.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {compaction}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_data_replay_duration_seconds`
|
||||
|
||||
Time taken to replay the data on disk.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_exemplar_exemplars_appended_total`
|
||||
|
||||
Total number of appended exemplars.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {exemplar}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_exemplar_exemplars_in_storage`
|
||||
|
||||
Number of exemplars currently in circular storage.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {exemplar}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_exemplar_last_exemplars_timestamp_seconds`
|
||||
|
||||
The timestamp of the oldest exemplar stored in circular storage.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_exemplar_max_exemplars`
|
||||
|
||||
Total number of exemplars the exemplar storage can store.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {exemplar}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_exemplar_out_of_order_exemplars_total`
|
||||
|
||||
Total number of out-of-order exemplar ingestion failed attempts.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {exemplar}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_exemplar_series_with_exemplars_in_storage`
|
||||
|
||||
Number of series with exemplars currently in circular storage.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {series}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_active_appenders`
|
||||
|
||||
Number of currently active appender transactions.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {appender}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_chunks`
|
||||
|
||||
Total number of chunks in the head block.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {chunk}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_chunks_created_total`
|
||||
|
||||
Total number of chunks created in the head block.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {chunk}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_chunks_removed_total`
|
||||
|
||||
Total number of chunks removed from the head block.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {chunk}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_chunks_storage_size_bytes`
|
||||
|
||||
Size of the chunks_head directory.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_gc_duration_seconds`
|
||||
|
||||
Runtime of garbage collection in the head block.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_max_time`
|
||||
|
||||
Maximum timestamp of the head block.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_max_time_seconds`
|
||||
|
||||
Maximum timestamp of the head block in seconds.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_min_time`
|
||||
|
||||
Minimum timestamp of the head block.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_min_time_seconds`
|
||||
|
||||
Minimum timestamp of the head block in seconds.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_out_of_order_samples_appended_total`
|
||||
|
||||
Total number of appended out-of-order samples.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `type` | string | The sample type. | float, histogram |
|
||||
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_samples_appended_total`
|
||||
|
||||
Total number of appended samples.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `type` | string | The sample type. | float, histogram |
|
||||
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_series`
|
||||
|
||||
Total number of series in the head block.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {series}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_series_created_total`
|
||||
|
||||
Total number of series created in the head block.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {series}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_series_not_found_total`
|
||||
|
||||
Total number of requests for series that were not found.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {request}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_series_removed_total`
|
||||
|
||||
Total number of series removed from the head block.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {series}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_stale_series`
|
||||
|
||||
Number of stale series in the head block.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {series}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_truncations_failed_total`
|
||||
|
||||
Total number of head truncations that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {truncation}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_head_truncations_total`
|
||||
|
||||
Total number of head truncations attempted.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {truncation}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_isolation_high_watermark`
|
||||
|
||||
The isolation high watermark.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_isolation_low_watermark`
|
||||
|
||||
The isolation low watermark.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_lowest_timestamp`
|
||||
|
||||
Lowest timestamp value stored in the database.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_lowest_timestamp_seconds`
|
||||
|
||||
Lowest timestamp value stored in the database in seconds.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_mmap_chunk_corruptions_total`
|
||||
|
||||
Total number of memory-mapped chunk corruptions.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {corruption}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_mmap_chunks_total`
|
||||
|
||||
Total number of memory-mapped chunks.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {chunk}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_bound_samples_total`
|
||||
|
||||
Total number of out-of-bound samples ingestion failed attempts.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `type` | string | The sample type. | float |
|
||||
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_samples_total`
|
||||
|
||||
Total number of out-of-order samples ingestion failed attempts.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `type` | string | The sample type. | float, histogram |
|
||||
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_completed_pages_total`
|
||||
|
||||
Total number of completed WBL pages for out-of-order samples.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {page}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_fsync_duration_seconds`
|
||||
|
||||
Duration of WBL fsync for out-of-order samples.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_page_flushes_total`
|
||||
|
||||
Total number of WBL page flushes for out-of-order samples.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {flush}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_record_part_writes_total`
|
||||
|
||||
Total number of WBL record part writes for out-of-order samples.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {write}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_record_parts_bytes_written_total`
|
||||
|
||||
Total bytes written to WBL record parts for out-of-order samples.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_segment_current`
|
||||
|
||||
Current out-of-order WBL segment.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {segment}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_storage_size_bytes`
|
||||
|
||||
Size of the out-of-order WBL storage.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_truncations_failed_total`
|
||||
|
||||
Total number of out-of-order WBL truncations that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {truncation}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_truncations_total`
|
||||
|
||||
Total number of out-of-order WBL truncations.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {truncation}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_out_of_order_wbl_writes_failed_total`
|
||||
|
||||
Total number of out-of-order WBL writes that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {write}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_reloads_failures_total`
|
||||
|
||||
Number of times the database reloads failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {reload}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_reloads_total`
|
||||
|
||||
Number of times the database reloads.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {reload}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_retention_limit_bytes`
|
||||
|
||||
Maximum number of bytes to be retained in the TSDB.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_retention_limit_seconds`
|
||||
|
||||
Maximum age in seconds for samples to be retained in the TSDB.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_sample_ooo_delta`
|
||||
|
||||
Delta in seconds between the time when an out-of-order sample was ingested and the latest sample in the chunk.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_size_retentions_total`
|
||||
|
||||
Number of times that blocks were deleted because the maximum number of bytes was exceeded.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {retention}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_snapshot_replay_error_total`
|
||||
|
||||
Total number of snapshot replay errors.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {error}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_storage_blocks_bytes`
|
||||
|
||||
The number of bytes that are currently used for local storage by all blocks.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_symbol_table_size_bytes`
|
||||
|
||||
Size of the symbol table in bytes.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_time_retentions_total`
|
||||
|
||||
Number of times that blocks were deleted because the maximum time limit was exceeded.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {retention}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_tombstone_cleanup_seconds`
|
||||
|
||||
Time taken to clean up tombstones.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_too_old_samples_total`
|
||||
|
||||
Total number of samples that were too old to be ingested.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {sample}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `type` | string | The sample type. | float |
|
||||
|
||||
|
||||
|
||||
### `prometheus_tsdb_vertical_compactions_total`
|
||||
|
||||
Total number of compactions done on overlapping blocks.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {compaction}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_completed_pages_total`
|
||||
|
||||
Total number of completed WAL pages.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {page}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_corruptions_total`
|
||||
|
||||
Total number of WAL corruptions.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {corruption}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_fsync_duration_seconds`
|
||||
|
||||
Duration of WAL fsync.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_page_flushes_total`
|
||||
|
||||
Total number of WAL page flushes.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {flush}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_record_bytes_saved_total`
|
||||
|
||||
Total bytes saved by WAL record compression.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `compression` | string | The compression algorithm. | snappy |
|
||||
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_record_part_writes_total`
|
||||
|
||||
Total number of WAL record part writes.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {write}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_record_parts_bytes_written_total`
|
||||
|
||||
Total bytes written to WAL record parts.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_segment_current`
|
||||
|
||||
Current WAL segment.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {segment}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_storage_size_bytes`
|
||||
|
||||
Size of the WAL storage.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_truncate_duration_seconds`
|
||||
|
||||
Duration of WAL truncation.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_truncations_failed_total`
|
||||
|
||||
Total number of WAL truncations that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {truncation}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_truncations_total`
|
||||
|
||||
Total number of WAL truncations.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {truncation}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_tsdb_wal_writes_failed_total`
|
||||
|
||||
Total number of WAL writes that failed.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {write}
|
||||
- **Stability:** development
|
||||
2705
tsdb/semconv/metrics.go
Normal file
2705
tsdb/semconv/metrics.go
Normal file
File diff suppressed because it is too large
Load diff
123
web/semconv/README.md
Normal file
123
web/semconv/README.md
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
<!-- Code generated from semantic convention specification. DO NOT EDIT. -->
|
||||
|
||||
# Metrics
|
||||
|
||||
This document describes the metrics defined in this semantic convention registry.
|
||||
|
||||
| Metric | Type | Unit | Description |
|
||||
|--------|------|------|-------------|
|
||||
| `prometheus_api_notification_active_subscribers` | gauge | {subscriber} | The current number of active notification subscribers. |
|
||||
| `prometheus_api_notification_updates_dropped_total` | counter | {update} | Total number of API notification updates that were dropped. |
|
||||
| `prometheus_api_notification_updates_sent_total` | counter | {update} | Total number of API notification updates sent. |
|
||||
| `prometheus_http_request_duration_seconds` | histogram | s | Histogram of latencies for HTTP requests. |
|
||||
| `prometheus_http_requests_total` | counter | {request} | Counter of HTTP requests. |
|
||||
| `prometheus_http_response_size_bytes` | histogram | By | Histogram of response size for HTTP requests. |
|
||||
| `prometheus_ready` | gauge | 1 | Whether Prometheus startup was fully completed and the server is ready for normal operation. |
|
||||
| `prometheus_web_federation_errors_total` | counter | {error} | Total number of errors that occurred while sending federation responses. |
|
||||
| `prometheus_web_federation_warnings_total` | counter | {warning} | Total number of warnings that occurred while sending federation responses. |
|
||||
|
||||
|
||||
## Metric Details
|
||||
|
||||
|
||||
### `prometheus_api_notification_active_subscribers`
|
||||
|
||||
The current number of active notification subscribers.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** {subscriber}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_api_notification_updates_dropped_total`
|
||||
|
||||
Total number of API notification updates that were dropped.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {update}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_api_notification_updates_sent_total`
|
||||
|
||||
Total number of API notification updates sent.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {update}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_http_request_duration_seconds`
|
||||
|
||||
Histogram of latencies for HTTP requests.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** s
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `handler` | string | The HTTP handler. | /, /-/healthy, /-/ready, /api/v1/query |
|
||||
|
||||
|
||||
|
||||
### `prometheus_http_requests_total`
|
||||
|
||||
Counter of HTTP requests.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {request}
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `code` | string | The HTTP response status code. | 200, 400, 404, 500 |
|
||||
| `handler` | string | The HTTP handler. | /, /-/healthy, /-/ready, /api/v1/query |
|
||||
|
||||
|
||||
|
||||
### `prometheus_http_response_size_bytes`
|
||||
|
||||
Histogram of response size for HTTP requests.
|
||||
|
||||
- **Type:** histogram
|
||||
- **Unit:** By
|
||||
- **Stability:** development
|
||||
|
||||
#### Attributes
|
||||
|
||||
| Attribute | Type | Description | Examples |
|
||||
|-----------|------|-------------|----------|
|
||||
| `handler` | string | The HTTP handler. | /, /-/healthy, /-/ready, /api/v1/query |
|
||||
|
||||
|
||||
|
||||
### `prometheus_ready`
|
||||
|
||||
Whether Prometheus startup was fully completed and the server is ready for normal operation.
|
||||
|
||||
- **Type:** gauge
|
||||
- **Unit:** 1
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_web_federation_errors_total`
|
||||
|
||||
Total number of errors that occurred while sending federation responses.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {error}
|
||||
- **Stability:** development
|
||||
|
||||
|
||||
### `prometheus_web_federation_warnings_total`
|
||||
|
||||
Total number of warnings that occurred while sending federation responses.
|
||||
|
||||
- **Type:** counter
|
||||
- **Unit:** {warning}
|
||||
- **Stability:** development
|
||||
334
web/semconv/metrics.go
Normal file
334
web/semconv/metrics.go
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
// Code generated from semantic convention specification. DO NOT EDIT.
|
||||
|
||||
// Package metrics provides Prometheus instrumentation types for metrics
|
||||
// defined in this semantic convention registry.
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
||||
// Attribute is an interface for metric label attributes.
|
||||
type Attribute interface {
|
||||
ID() string
|
||||
Value() string
|
||||
}
|
||||
type CodeAttr string
|
||||
|
||||
func (a CodeAttr) ID() string {
|
||||
return "code"
|
||||
}
|
||||
|
||||
func (a CodeAttr) Value() string {
|
||||
return string(a)
|
||||
}
|
||||
|
||||
type HandlerAttr string
|
||||
|
||||
func (a HandlerAttr) ID() string {
|
||||
return "handler"
|
||||
}
|
||||
|
||||
func (a HandlerAttr) Value() string {
|
||||
return string(a)
|
||||
}
|
||||
|
||||
// PrometheusAPINotificationActiveSubscribers records the current number of active notification subscribers.
|
||||
type PrometheusAPINotificationActiveSubscribers struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusAPINotificationActiveSubscribers returns a new PrometheusAPINotificationActiveSubscribers instrument.
|
||||
func NewPrometheusAPINotificationActiveSubscribers() PrometheusAPINotificationActiveSubscribers {
|
||||
labels := []string{}
|
||||
return PrometheusAPINotificationActiveSubscribers{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_api_notification_active_subscribers",
|
||||
Help: "The current number of active notification subscribers.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusAPINotificationActiveSubscribersAttr interface {
|
||||
Attribute
|
||||
implPrometheusAPINotificationActiveSubscribers()
|
||||
}
|
||||
|
||||
func (m PrometheusAPINotificationActiveSubscribers) With(
|
||||
extra ...PrometheusAPINotificationActiveSubscribersAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusAPINotificationUpdatesDroppedTotal records the total number of API notification updates that were dropped.
|
||||
type PrometheusAPINotificationUpdatesDroppedTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusAPINotificationUpdatesDroppedTotal returns a new PrometheusAPINotificationUpdatesDroppedTotal instrument.
|
||||
func NewPrometheusAPINotificationUpdatesDroppedTotal() PrometheusAPINotificationUpdatesDroppedTotal {
|
||||
labels := []string{}
|
||||
return PrometheusAPINotificationUpdatesDroppedTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_api_notification_updates_dropped_total",
|
||||
Help: "Total number of API notification updates that were dropped.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusAPINotificationUpdatesDroppedTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusAPINotificationUpdatesDroppedTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusAPINotificationUpdatesDroppedTotal) With(
|
||||
extra ...PrometheusAPINotificationUpdatesDroppedTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusAPINotificationUpdatesSentTotal records the total number of API notification updates sent.
|
||||
type PrometheusAPINotificationUpdatesSentTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusAPINotificationUpdatesSentTotal returns a new PrometheusAPINotificationUpdatesSentTotal instrument.
|
||||
func NewPrometheusAPINotificationUpdatesSentTotal() PrometheusAPINotificationUpdatesSentTotal {
|
||||
labels := []string{}
|
||||
return PrometheusAPINotificationUpdatesSentTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_api_notification_updates_sent_total",
|
||||
Help: "Total number of API notification updates sent.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusAPINotificationUpdatesSentTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusAPINotificationUpdatesSentTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusAPINotificationUpdatesSentTotal) With(
|
||||
extra ...PrometheusAPINotificationUpdatesSentTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusHTTPRequestDurationSeconds records the histogram of latencies for HTTP requests.
|
||||
type PrometheusHTTPRequestDurationSeconds struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusHTTPRequestDurationSeconds returns a new PrometheusHTTPRequestDurationSeconds instrument.
|
||||
func NewPrometheusHTTPRequestDurationSeconds() PrometheusHTTPRequestDurationSeconds {
|
||||
labels := []string{
|
||||
"handler",
|
||||
}
|
||||
return PrometheusHTTPRequestDurationSeconds{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_http_request_duration_seconds",
|
||||
Help: "Histogram of latencies for HTTP requests.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusHTTPRequestDurationSecondsAttr interface {
|
||||
Attribute
|
||||
implPrometheusHTTPRequestDurationSeconds()
|
||||
}
|
||||
|
||||
func (a HandlerAttr) implPrometheusHTTPRequestDurationSeconds() {}
|
||||
|
||||
func (m PrometheusHTTPRequestDurationSeconds) With(
|
||||
extra ...PrometheusHTTPRequestDurationSecondsAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{
|
||||
"handler": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusHTTPRequestsTotal records the counter of HTTP requests.
|
||||
type PrometheusHTTPRequestsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusHTTPRequestsTotal returns a new PrometheusHTTPRequestsTotal instrument.
|
||||
func NewPrometheusHTTPRequestsTotal() PrometheusHTTPRequestsTotal {
|
||||
labels := []string{
|
||||
"handler",
|
||||
"code",
|
||||
}
|
||||
return PrometheusHTTPRequestsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_http_requests_total",
|
||||
Help: "Counter of HTTP requests.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusHTTPRequestsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusHTTPRequestsTotal()
|
||||
}
|
||||
|
||||
func (a HandlerAttr) implPrometheusHTTPRequestsTotal() {}
|
||||
func (a CodeAttr) implPrometheusHTTPRequestsTotal() {}
|
||||
|
||||
func (m PrometheusHTTPRequestsTotal) With(
|
||||
extra ...PrometheusHTTPRequestsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{
|
||||
"handler": "",
|
||||
"code": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusHTTPResponseSizeBytes records the histogram of response size for HTTP requests.
|
||||
type PrometheusHTTPResponseSizeBytes struct {
|
||||
*prometheus.HistogramVec
|
||||
}
|
||||
|
||||
// NewPrometheusHTTPResponseSizeBytes returns a new PrometheusHTTPResponseSizeBytes instrument.
|
||||
func NewPrometheusHTTPResponseSizeBytes() PrometheusHTTPResponseSizeBytes {
|
||||
labels := []string{
|
||||
"handler",
|
||||
}
|
||||
return PrometheusHTTPResponseSizeBytes{
|
||||
HistogramVec: prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Name: "prometheus_http_response_size_bytes",
|
||||
Help: "Histogram of response size for HTTP requests.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusHTTPResponseSizeBytesAttr interface {
|
||||
Attribute
|
||||
implPrometheusHTTPResponseSizeBytes()
|
||||
}
|
||||
|
||||
func (a HandlerAttr) implPrometheusHTTPResponseSizeBytes() {}
|
||||
|
||||
func (m PrometheusHTTPResponseSizeBytes) With(
|
||||
extra ...PrometheusHTTPResponseSizeBytesAttr,
|
||||
) prometheus.Observer {
|
||||
labels := prometheus.Labels{
|
||||
"handler": "",
|
||||
}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.HistogramVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusReady records the whether Prometheus startup was fully completed and the server is ready for normal operation.
|
||||
type PrometheusReady struct {
|
||||
*prometheus.GaugeVec
|
||||
}
|
||||
|
||||
// NewPrometheusReady returns a new PrometheusReady instrument.
|
||||
func NewPrometheusReady() PrometheusReady {
|
||||
labels := []string{}
|
||||
return PrometheusReady{
|
||||
GaugeVec: prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "prometheus_ready",
|
||||
Help: "Whether Prometheus startup was fully completed and the server is ready for normal operation.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusReadyAttr interface {
|
||||
Attribute
|
||||
implPrometheusReady()
|
||||
}
|
||||
|
||||
func (m PrometheusReady) With(
|
||||
extra ...PrometheusReadyAttr,
|
||||
) prometheus.Gauge {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.GaugeVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusWebFederationErrorsTotal records the total number of errors that occurred while sending federation responses.
|
||||
type PrometheusWebFederationErrorsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusWebFederationErrorsTotal returns a new PrometheusWebFederationErrorsTotal instrument.
|
||||
func NewPrometheusWebFederationErrorsTotal() PrometheusWebFederationErrorsTotal {
|
||||
labels := []string{}
|
||||
return PrometheusWebFederationErrorsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_web_federation_errors_total",
|
||||
Help: "Total number of errors that occurred while sending federation responses.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusWebFederationErrorsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusWebFederationErrorsTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusWebFederationErrorsTotal) With(
|
||||
extra ...PrometheusWebFederationErrorsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
|
||||
// PrometheusWebFederationWarningsTotal records the total number of warnings that occurred while sending federation responses.
|
||||
type PrometheusWebFederationWarningsTotal struct {
|
||||
*prometheus.CounterVec
|
||||
}
|
||||
|
||||
// NewPrometheusWebFederationWarningsTotal returns a new PrometheusWebFederationWarningsTotal instrument.
|
||||
func NewPrometheusWebFederationWarningsTotal() PrometheusWebFederationWarningsTotal {
|
||||
labels := []string{}
|
||||
return PrometheusWebFederationWarningsTotal{
|
||||
CounterVec: prometheus.NewCounterVec(prometheus.CounterOpts{
|
||||
Name: "prometheus_web_federation_warnings_total",
|
||||
Help: "Total number of warnings that occurred while sending federation responses.",
|
||||
}, labels),
|
||||
}
|
||||
}
|
||||
|
||||
type PrometheusWebFederationWarningsTotalAttr interface {
|
||||
Attribute
|
||||
implPrometheusWebFederationWarningsTotal()
|
||||
}
|
||||
|
||||
func (m PrometheusWebFederationWarningsTotal) With(
|
||||
extra ...PrometheusWebFederationWarningsTotalAttr,
|
||||
) prometheus.Counter {
|
||||
labels := prometheus.Labels{}
|
||||
for _, v := range extra {
|
||||
labels[v.ID()] = v.Value()
|
||||
}
|
||||
return m.CounterVec.With(labels)
|
||||
}
|
||||
Loading…
Reference in a new issue