metrics

package
v0.0.0-...-7635388 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package metrics provides utilities for generating metrics-related collateral for a binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exported

type Exported struct {
	Name        string
	Type        string
	Description string
}

Exported contains the name, type, and description of an exported metric.

type OpenCensusRegistry

type OpenCensusRegistry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

OpenCensusRegistry should only be used to collected exported metrics for the offline generation of collateral. It is not suitable for production usage.

func NewOpenCensusRegistry

func NewOpenCensusRegistry() *OpenCensusRegistry

NewOpenCensusRegistry collects a list of exported metrics. As part of the setup, it configures the OpenCensus mechanisms for rapid reporting (1ms) and sleeps for double that period (2ms) to ensure an export happens before generation.

func (*OpenCensusRegistry) ExportView

func (r *OpenCensusRegistry) ExportView(d *view.Data)

ExportView implements view.Exporter

func (*OpenCensusRegistry) ExportedMetrics

func (r *OpenCensusRegistry) ExportedMetrics() []Exported

Jump to

Keyboard shortcuts

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