package metrictest

import "go.opentelemetry.io/otel/sdk/metric/metrictest"

Index

Functions

func NewDescriptor

func NewDescriptor(name string, ikind sdkapi.InstrumentKind, nkind number.Kind, opts ...instrument.Option) sdkapi.Descriptor

NewDescriptor is a test helper for constructing test metric descriptors using standard options.

Types

type Batch

type Batch struct {
	// Measurement needs to be aligned for 64-bit atomic operations.
	Measurements []Measurement
	Ctx          context.Context
	Labels       []attribute.KeyValue
	Library      Library
}

type Library

type Library struct {
	InstrumentationName    string
	InstrumentationVersion string
	SchemaURL              string
}

Library is the same as "sdk/instrumentation".Library but there is a package cycle to use it.

type Measurement

type Measurement struct {
	// Number needs to be aligned for 64-bit atomic operations.
	Number     number.Number
	Instrument sdkapi.InstrumentImpl
}

Source Files

meter.go

Version
v0.29.0
Published
Apr 11, 2022
Platform
windows/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.