Documentation ¶
Index ¶
- func CollectScope(t *testing.T, collectors []data.Collector, seq data.Sequence) []data.Instrument
- func CollectScopeReuse(t *testing.T, collectors []data.Collector, seq data.Sequence, ...) []data.Instrument
- func Descriptor(name string, ik sdkinstrument.Kind, nk number.Kind) sdkinstrument.Descriptor
- func DescriptorDescUnit(name string, ik sdkinstrument.Kind, nk number.Kind, desc, unit string) sdkinstrument.Descriptor
- func Instrument(desc sdkinstrument.Descriptor, points ...data.Point) data.Instrument
- func Library(name string, opts ...metric.MeterOption) instrumentation.Library
- func Metrics(res *resource.Resource, scopes ...data.Scope) data.Metrics
- func OTelErrors() *[]error
- func Point(start, end time.Time, agg aggregation.Aggregation, ...) data.Point
- func RequireEqualMetrics(t *testing.T, output []data.Instrument, expected ...data.Instrument)
- func RequireEqualPoints(t *testing.T, output []data.Point, expected ...data.Point)
- func RequireEqualResourceMetrics(t *testing.T, output data.Metrics, expectRes *resource.Resource, ...)
- func Scope(library instrumentation.Library, insts ...data.Instrument) data.Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectScope ¶
func CollectScopeReuse ¶
func Descriptor ¶
func Descriptor(name string, ik sdkinstrument.Kind, nk number.Kind) sdkinstrument.Descriptor
func DescriptorDescUnit ¶ added in v1.13.0
func DescriptorDescUnit(name string, ik sdkinstrument.Kind, nk number.Kind, desc, unit string) sdkinstrument.Descriptor
func Instrument ¶
func Instrument(desc sdkinstrument.Descriptor, points ...data.Point) data.Instrument
func Library ¶
func Library(name string, opts ...metric.MeterOption) instrumentation.Library
func OTelErrors ¶
func OTelErrors() *[]error
func Point ¶
func Point(start, end time.Time, agg aggregation.Aggregation, tempo aggregation.Temporality, kvs ...attribute.KeyValue) data.Point
func RequireEqualMetrics ¶
func RequireEqualMetrics( t *testing.T, output []data.Instrument, expected ...data.Instrument)
RequireEqualMetrics checks that an output equals the expected output, where the points are taken to be unordered. Instrument order is expected to match because the compiler preserves the order of views and instruments as they are compiled.
func RequireEqualPoints ¶
func Scope ¶
func Scope(library instrumentation.Library, insts ...data.Instrument) data.Scope
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.