metricutil

package
v0.13.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Meter

func Meter(mp metric.MeterProvider) metric.Meter

Meter returns a Meter from the MetricProvider that indicates the measurement comes from buildx with the appropriate version.

func Resource

func Resource() *resource.Resource

Resource retrieves the OTEL resource for the buildx CLI.

Types

type MeterProvider

type MeterProvider struct {
	metric.MeterProvider
	// contains filtered or unexported fields
}

MeterProvider holds a MeterProvider for metric generation and the configured exporters for reporting metrics from the CLI.

func NewMeterProvider

func NewMeterProvider(ctx context.Context, cli command.Cli) (*MeterProvider, error)

NewMeterProvider configures a MeterProvider from the CLI context.

func (*MeterProvider) Report

func (m *MeterProvider) Report(ctx context.Context)

Report exports metrics to the configured exporter. This should be done before the CLI exits.

Jump to

Keyboard shortcuts

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