versions

package
v0.0.0-...-ef45db5 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: 4 Imported by: 4

Documentation

Overview

Package versions allows processes to report string-valued metrics with versions of various libraries they link with.

The metric is named 'luci/components/version', and it has single field 'component' that defines the logical name of the component whose version is reported by the metric value.

Having such metrics allows to easily detect processes that use stale code in production.

Various go packages can register their versions during 'init' time, and all registered version will be flushed to monitoring whenever 'Report' is called.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(component, version string)

Register tells the library to start reporting a version for given component.

This should usually called during 'init' time.

The component name will be used as a value of 'component' metric field, and the given version will become the actual reported metric value. It is a good idea to use a fully qualified go package name as 'component'.

func Report

func Report(ctx context.Context)

Report populates 'luci/components/version' metric with versions of all registered components.

Types

This section is empty.

Jump to

Keyboard shortcuts

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