Documentation
¶
Index ¶
- func Flush(ctx context.Context, sections ...*global.Linters)
- func IncDmtLinterErrorsCount(linter, rule, level string)
- func SetDmtInfo()
- func SetDmtRuntimeDuration()
- func SetDmtRuntimeDurationSeconds()
- func SetLinterWarningsMetrics(linters *global.Linters)
- type PrometheusMetricsService
- func (m PrometheusMetricsService) CounterAdd(metric string, value float64, labels map[string]string)
- func (m PrometheusMetricsService) GaugeAdd(metric string, value float64, labels map[string]string)
- func (m PrometheusMetricsService) GaugeSet(metric string, value float64, labels map[string]string)
- func (p *PrometheusMetricsService) GetTimeSeries() []promremote.TimeSeries
- func (m PrometheusMetricsService) HistogramObserve(metric string, value float64, labels map[string]string, buckets []float64)
- func (p *PrometheusMetricsService) Send(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Flush ¶ added in v0.2.4
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
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 (*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 (*PrometheusMetricsService) Send ¶
func (p *PrometheusMetricsService) Send(ctx context.Context)