metrics

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flush added in v0.2.4

func Flush(ctx context.Context, sections ...*global.Linters)

Flush records the run-level metrics and ships everything collected during the run. Both lint paths end with it: the remote path used to collect its findings metrics through IncDmtLinterErrorsCount and then never send them, which looked like a working run right up until nobody could find its data.

sections are the config sections the run linted with — `linters-settings` for the source tree, `remote.bundle` and `remote.release` for the published images.

func IncDmtLinterErrorsCount added in v0.1.19

func IncDmtLinterErrorsCount(linter, rule, level string)

func SetDmtInfo added in v0.1.10

func SetDmtInfo()

func SetDmtRuntimeDuration added in v0.1.10

func SetDmtRuntimeDuration()

func SetDmtRuntimeDurationSeconds added in v0.1.10

func SetDmtRuntimeDurationSeconds()

func SetLinterWarningsMetrics added in v0.1.10

func SetLinterWarningsMetrics(linters *global.Linters)

TODO: refactor this ASAP

Types

type PrometheusMetricsService

type PrometheusMetricsService struct {
	// contains filtered or unexported fields
}

func GetClient added in v0.1.10

func GetClient(dir string) *PrometheusMetricsService

func (PrometheusMetricsService) CounterAdd added in v0.1.10

func (m PrometheusMetricsService) CounterAdd(metric string, value float64, labels map[string]string)

func (PrometheusMetricsService) GaugeAdd added in v0.1.10

func (m PrometheusMetricsService) GaugeAdd(metric string, value float64, labels map[string]string)

func (PrometheusMetricsService) GaugeSet added in v0.1.10

func (m PrometheusMetricsService) GaugeSet(metric string, value float64, labels map[string]string)

func (*PrometheusMetricsService) GetTimeSeries added in v0.1.10

func (p *PrometheusMetricsService) GetTimeSeries() []promremote.TimeSeries

GetTimeSeries converts Prometheus metric families to a map of promremote.TimeSeries where the key is the metric name and the value is a slice of time series for that metric

func (PrometheusMetricsService) HistogramObserve added in v0.1.10

func (m PrometheusMetricsService) HistogramObserve(metric string, value float64, labels map[string]string, buckets []float64)

func (*PrometheusMetricsService) Send

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL