plogutil

package
v0.116.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MoveRecordsWithContextIf

func MoveRecordsWithContextIf(from, to plog.Logs, f func(plog.ResourceLogs, plog.ScopeLogs, plog.LogRecord) bool)

MoveRecordsWithContextIf calls f sequentially for each LogRecord present in the first plog.Logs. If f returns true, the element is removed from the first plog.Logs and added to the second plog.Logs. Notably, the Resource and Scope associated with the LogRecord are created in the second plog.Logs only once. Resources or Scopes are removed from the original if they become empty. All ordering is preserved.

func MoveResourcesIf

func MoveResourcesIf(from, to plog.Logs, f func(plog.ResourceLogs) bool)

MoveResourcesIf calls f sequentially for each ResourceLogs present in the first plog.Logs. If f returns true, the element is removed from the first plog.Logs and added to the second plog.Logs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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