metrics

package module
v0.102.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(mdA pmetric.Metrics, mdB pmetric.Metrics) pmetric.Metrics

Merge will merge the metrics data in mdB into mdA, then return mdA. mdB will not be modified. The function will attempt to merge the data in mdB into existing ResourceMetrics / ScopeMetrics / Metrics in mdA if possible. If they don't exist, new entries will be created as needed.

NOTE: Any "unnecessary" duplicate entries in mdA will *not* be combined. For example if mdA contains two ResourcMetric entries with identical Resource values, they will not be combined. If you wish to have this behavior, you could call this function twice:

cleanedMetrics := Merge(pmetric.NewMetrics(), mdA)
Merge(cleanedMetrics, mdB)

That said, this will do a large amount of memory copying

Types

This section is empty.

Directories

Path Synopsis
identity types for metrics and sample streams.
identity types for metrics and sample streams.

Jump to

Keyboard shortcuts

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