pmetricutiltest

package
v0.114.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Metric added in v0.114.0

func Metric(id string, dps ...pmetric.NumberDataPoint) pmetric.Metric

func NewMetrics

func NewMetrics(resourceIDs, scopeIDs, metricIDs, dataPointIDs string) pmetric.Metrics

NewMetrics returns a pmetric.Metrics with a uniform structure where resources, scopes, metrics, and datapoints are identical across all instances, except for one identifying field.

Identifying fields: - Resources have an attribute called "resourceName" with a value of "resourceN". - Scopes have a name with a value of "scopeN". - Metrics have a name with a value of "metricN" and a single time series of data points. - DataPoints have an attribute "dpName" with a value of "dpN".

Example: NewMetrics("AB", "XYZ", "MN", "1234") returns:

resourceA, resourceB
    each with scopeX, scopeY, scopeZ
        each with metricM, metricN
            each with dp1, dp2, dp3, dp4

Each byte in the input string is a unique ID for the corresponding element.

func NewMetricsFromOpts added in v0.114.0

func NewMetricsFromOpts(resources ...pmetric.ResourceMetrics) pmetric.Metrics

func NumberDataPoint added in v0.114.0

func NumberDataPoint(id string) pmetric.NumberDataPoint

func Resource added in v0.114.0

func Resource(id string, scopes ...pmetric.ScopeMetrics) pmetric.ResourceMetrics

func Scope added in v0.114.0

func Scope(id string, metrics ...pmetric.Metric) pmetric.ScopeMetrics

Types

This section is empty.

Jump to

Keyboard shortcuts

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