connector

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package connector provides tools for sharing the connection of diverse exporters (Prometheus, OTEL...) from different nodes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrometheusManager

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

PrometheusManager allows exporting metrics from different sources (instrumented metrics, internal metrics...) sharing the same port and path, or using different ones, depending on the configuration provided by the registrars.

func (*PrometheusManager) InstrumentWith

func (pm *PrometheusManager) InstrumentWith(ii internalIntrumenter)

func (*PrometheusManager) Register

func (pm *PrometheusManager) Register(port int, path string, collectors ...prometheus.Collector)

Register a set of prometheus metrics to be accessible through an HTTP port/path. This method is not thread-safe

func (*PrometheusManager) StartHTTP

func (pm *PrometheusManager) StartHTTP(ctx context.Context)

StartHTTP serves metrics in background. Its invocation won't have effect if it has been invoked previously, so invoke it only after you are sure that all the collectors have been registered via the Register method.

Jump to

Keyboard shortcuts

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