insmetrics

package
v0.9.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 6 Imported by: 74

Documentation

Overview

Package insmetrics provides helpers for opencesus metrics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeTags

func ChangeTags(ctx context.Context, mutator ...tag.Mutator) context.Context

ChangeTags wrapper around opencensus tag.New which panics on any tag creation error.

Panics on errors.

func InsertTag

func InsertTag(ctx context.Context, key tag.Key, value string) context.Context

InsertTag inserts (add) tag with provided value into context.

Panics on error.

func MustTagKey

func MustTagKey(key string) tag.Key

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

type Errorer added in v0.9.1

type Errorer interface {
	Error(...interface{})
}

Errorer is a logger with error

Jump to

Keyboard shortcuts

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