Documentation ¶
Overview ¶
Package insmetrics provides helpers for opencesus metrics.
Index ¶
- func ChangeTags(ctx context.Context, mutator ...tag.Mutator) context.Context
- func ExtractValue(s string) string
- func FindMetricsByNamePrefix(r io.Reader, prefix string) []string
- func InsertTag(ctx context.Context, key tag.Key, value string) context.Context
- func MustTagKey(key string) tag.Key
- func RegisterPrometheus(namespace string, registry *prometheusclient.Registry, ...) (*prometheus.Exporter, error)
- func SumMetricsValueByNamePrefix(r io.Reader, prefix string) float64
- type Errorer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeTags ¶
ChangeTags wrapper around opencensus tag.New which panics on any tag creation error.
Panics on errors.
func ExtractValue ¶
ExtractValue extracts value of metric from line in OpenMetrics format.
func FindMetricsByNamePrefix ¶
FindMetricsByNamePrefix finds all metrics with prefix. Reader expects to provide text stream in OpenMetrics format,
func MustTagKey ¶
MustTagKey creates new tag.Key, panics on error
func RegisterPrometheus ¶
func RegisterPrometheus( namespace string, registry *prometheusclient.Registry, reportperiod time.Duration, logger Errorer, nodeRole string, ) (*prometheus.Exporter, error)
RegisterPrometheus creates prometheus exporter and registers it in opencensus view lib.
Types ¶
Click to show internal directories.
Click to hide internal directories.