telemetry

package
v0.0.0-...-6ee8545 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildPlatform string

BuildPlatform To fill this variable in build time, use linker flags. Example: go build -ldflags="-X github.com/timescale/promscale/pkg/telemetry.BuildPlatform=<any_string>" ./cmd/promscale/

View Source
var ErrInvalidMetric = fmt.Errorf("metric not a counter or gauge")

Functions

This section is empty.

Types

type Engine

type Engine interface {
	// RegisterMetric registers a Prometheus metric with a column name. This metric is
	// monitored every telemetrySync and updated in the telemetry table.
	RegisterMetric(columnName string, gaugeOrCounterMetric ...prometheus.Metric) error

	// RegisterDynamicMetadata is a Prometheus metric that changes regularly. This is monitored
	// every telemetrySync and updated in the telemetry table.
	RegisterDynamicMetadata(columnName string, gauge prometheus.Metric) error
	Start()
	Stop()
}

Engine for telemetry performs activities like inserting metadata of Promscale and Tobs (env vars with 'TOBS_TELEMETRY_') into the _timescaledb_catalog.metadata table. It allows the caller to register Prometheus Counter & Gauge metrics that will be monitored every hour and filled into _ps_catalog.promscale_instance_information table and then into the _timescaledb_catalog.metadata table.

func NewEngine

func NewEngine(conn pgxconn.PgxConn, uuid [16]byte, promqlQueryable promql.Queryable) (Engine, error)

type Metadata

type Metadata map[string]string

Jump to

Keyboard shortcuts

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