plogtest

package
v0.99.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareLogRecord

func CompareLogRecord(expected, actual plog.LogRecord) error

CompareLogRecord compares each part of two given LogRecord and returns an error if they don't match. The error describes what didn't match.

func CompareLogs

func CompareLogs(expected, actual plog.Logs, options ...CompareLogsOption) error

CompareLogs compares each part of two given Logs and returns an error if they don't match. The error describes what didn't match.

func CompareResourceLogs

func CompareResourceLogs(expected, actual plog.ResourceLogs) error

CompareResourceLogs compares each part of two given ResourceLogs and returns an error if they don't match. The error describes what didn't match.

func CompareScopeLogs

func CompareScopeLogs(expected, actual plog.ScopeLogs) error

CompareScopeLogs compares each part of two given LogRecordSlices and returns an error if they don't match. The error describes what didn't match.

Types

type CompareLogsOption

type CompareLogsOption interface {
	// contains filtered or unexported methods
}

CompareLogsOption can be used to mutate expected and/or actual logs before comparing.

func IgnoreLogRecordsOrder

func IgnoreLogRecordsOrder() CompareLogsOption

IgnoreLogRecordsOrder is a CompareLogsOption that ignores the order of log records.

func IgnoreObservedTimestamp

func IgnoreObservedTimestamp() CompareLogsOption

func IgnoreResourceAttributeValue

func IgnoreResourceAttributeValue(attributeName string) CompareLogsOption

IgnoreResourceAttributeValue is a CompareLogsOption that removes a resource attribute from all resources.

func IgnoreResourceLogsOrder

func IgnoreResourceLogsOrder() CompareLogsOption

IgnoreResourceLogsOrder is a CompareLogsOption that ignores the order of resource traces/metrics/logs.

func IgnoreScopeLogsOrder

func IgnoreScopeLogsOrder() CompareLogsOption

IgnoreScopeLogsOrder is a CompareLogsOption that ignores the order of instrumentation scope traces/metrics/logs.

func IgnoreTimestamp added in v0.99.0

func IgnoreTimestamp() CompareLogsOption

Jump to

Keyboard shortcuts

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