Documentation ¶
Index ¶
- func CompareLogRecord(expected, actual plog.LogRecord) error
- func CompareLogs(expected, actual plog.Logs, options ...CompareLogsOption) error
- func CompareResourceLogs(expected, actual plog.ResourceLogs) error
- func CompareScopeLogs(expected, actual plog.ScopeLogs) error
- type CompareLogsOption
- func IgnoreLogRecordAttributeValue(attributeName string) CompareLogsOption
- func IgnoreLogRecordsOrder() CompareLogsOption
- func IgnoreObservedTimestamp() CompareLogsOption
- func IgnoreResourceAttributeValue(attributeName string) CompareLogsOption
- func IgnoreResourceLogsOrder() CompareLogsOption
- func IgnoreScopeLogsOrder() CompareLogsOption
- func IgnoreTimestamp() CompareLogsOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareLogRecord ¶
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 ¶
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 IgnoreLogRecordAttributeValue ¶ added in v0.112.0
func IgnoreLogRecordAttributeValue(attributeName string) CompareLogsOption
IgnoreLogRecordAttributeValue is a CompareLogsOption that sets the value of an attribute to empty bytes for every log record
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