util

package
v0.0.0-...-f73c5c5 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasMetric

func HasMetric(metrics pmetric.Metrics, name string) bool

HasMetric returns true if a metric with matching name is present.

func ReadTraces

func ReadTraces(traceFS *embed.FS, name string) ([]ptrace.Traces, error)

ReadTraces unmarshals trace data from the filesystem and returns the resulting []ptrace.Traces. The traceFS argument should represent an embedded data directory containing traces in JSON format under testdata/traces/*.json rooted in the test suite directory. The JSON files should include a single serialized ptrace.Trace per line.

Types

type NoopHost

type NoopHost struct{}

func (*NoopHost) GetExporters

func (*NoopHost) GetExporters() map[component.Type]map[component.ID]component.Component

GetExporters implements component.Host.

func (*NoopHost) GetExtensions

func (*NoopHost) GetExtensions() map[component.ID]component.Component

GetExtensions implements component.Host.

func (*NoopHost) GetFactory

func (*NoopHost) GetFactory(kind component.Kind, componentType component.Type) component.Factory

GetFactory implements component.Host.

func (*NoopHost) ReportFatalError

func (*NoopHost) ReportFatalError(err error)

ReportFatalError implements component.Host.

Jump to

Keyboard shortcuts

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