pushgateway

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectorResolver

type CollectorResolver func(sample metrics.Sample, labels prometheus.Labels, prefix string) []prometheus.Collector

CollectorResolver is an interface to resolve the various types of the metrics.Metric to the prometheus.Collector. Respective k6 metric type are solved by following the conversion rule which the xk6-output-prometheus-remote extension applies.

func CreateResolver

func CreateResolver(t metrics.MetricType) CollectorResolver

CreateResolveer is a factory method to create the [ColloectorResolver] implementation corresponding to the given k6 metric type.

Example use case:

collectorResolver := collector_resolver.CreateResolver(sample.Metric.Type)
collectors := collectorResolver(sample.Metric, time.Now())

Jump to

Keyboard shortcuts

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