pdatautil

package module
v0.119.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlattenLogs

func FlattenLogs(rls plog.ResourceLogsSlice)

FlattenResourceLogs moves each LogRecord onto a dedicated ResourceLogs and ScopeLogs. Modifications are made in place. Order of LogRecords is preserved.

func GetAttributeValue added in v0.109.0

func GetAttributeValue(key string, attributes ...pcommon.Map) (string, bool)

GetAttributeValue look up value from the given attributes for the specified key, and if not found, return empty string.

func GetDimensionValue added in v0.109.0

func GetDimensionValue(d Dimension, attributes ...pcommon.Map) (v pcommon.Value, ok bool)

GetDimensionValue gets the Dimension Value for the given configured Dimension. It iterates over multiple attributes until a value is found. The order comes first, the higher the priority. Finally, falls back to the configured default value if provided.

The ok flag indicates if a Dimension Value was fetched in order to differentiate an empty string value from a state where no value was found.

func GroupByResourceLogs

func GroupByResourceLogs(rls plog.ResourceLogsSlice)

GroupByResourceLogs groups ScopeLogs by Resource. Modifications are made in place.

func GroupByScopeLogs

func GroupByScopeLogs(sls plog.ScopeLogsSlice)

GroupByScopeLogs groups LogRecords by scope. Modifications are made in place.

func HashScopeLogs

func HashScopeLogs(sl plog.ScopeLogs) [16]byte

Creates a hash based on the ScopeLogs attributes, name, and version

Types

type Dimension added in v0.109.0

type Dimension struct {
	Name  string
	Value *pcommon.Value
}

Jump to

Keyboard shortcuts

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