Documentation ¶
Index ¶
- func CompareLogRecordSlices(expected, actual plog.LogRecordSlice) error
- func CompareLogRecords(expected, actual plog.LogRecord) error
- func CompareLogs(expected, actual plog.Logs, options ...LogsCompareOption) error
- func CompareMetricSlices(expected, actual pmetric.MetricSlice) error
- func CompareMetrics(expected, actual pmetric.Metrics, options ...MetricsCompareOption) error
- func CompareNumberDataPointSlices(expected, actual pmetric.NumberDataPointSlice) error
- func CompareNumberDataPoints(expected, actual pmetric.NumberDataPoint) error
- func CompareResourceLogs(expected, actual plog.ResourceLogs) error
- func CompareResourceMetrics(expected, actual pmetric.ResourceMetrics) error
- type CompareOption
- type LogsCompareOption
- type MetricsCompareOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareLogRecordSlices ¶ added in v0.69.0
func CompareLogRecordSlices(expected, actual plog.LogRecordSlice) error
CompareLogRecordSlices compares each part of two given LogRecordSlices and returns an error if they don't match. The error describes what didn't match.
func CompareLogRecords ¶ added in v0.69.0
CompareLogRecords 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 ¶ added in v0.69.0
func CompareLogs(expected, actual plog.Logs, options ...LogsCompareOption) 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 CompareMetricSlices ¶
func CompareMetricSlices(expected, actual pmetric.MetricSlice) error
CompareMetricSlices compares each part of two given MetricSlices and returns an error if they don't match. The error describes what didn't match. The expected and actual values are clones before options are applied.
func CompareMetrics ¶
func CompareMetrics(expected, actual pmetric.Metrics, options ...MetricsCompareOption) error
func CompareNumberDataPointSlices ¶
func CompareNumberDataPointSlices(expected, actual pmetric.NumberDataPointSlice) error
CompareNumberDataPointSlices compares each part of two given NumberDataPointSlices and returns an error if they don't match. The error describes what didn't match.
func CompareNumberDataPoints ¶
func CompareNumberDataPoints(expected, actual pmetric.NumberDataPoint) error
CompareNumberDataPoints compares each part of two given NumberDataPoints and returns an error if they don't match. The error describes what didn't match.
func CompareResourceLogs ¶ added in v0.69.0
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 CompareResourceMetrics ¶
func CompareResourceMetrics(expected, actual pmetric.ResourceMetrics) error
Types ¶
type CompareOption ¶
type CompareOption interface { MetricsCompareOption LogsCompareOption }
func IgnoreResourceAttributeValue ¶
func IgnoreResourceAttributeValue(attributeName string) CompareOption
IgnoreResourceAttributeValue is a CompareOption that removes a resource attribute from all resources.
type LogsCompareOption ¶ added in v0.69.0
type LogsCompareOption interface {
// contains filtered or unexported methods
}
LogsCompareOption can be used to mutate expected and/or actual logs before comparing.
func IgnoreObservedTimestamp ¶ added in v0.69.0
func IgnoreObservedTimestamp() LogsCompareOption
type MetricsCompareOption ¶ added in v0.69.0
type MetricsCompareOption interface {
// contains filtered or unexported methods
}
MetricsCompareOption can be used to mutate expected and/or actual metrics before comparing.
func IgnoreMetricAttributeValue ¶
func IgnoreMetricAttributeValue(attributeName string, metricNames ...string) MetricsCompareOption
IgnoreMetricAttributeValue is a MetricsCompareOption that clears value of the metric attribute.
func IgnoreMetricValues ¶
func IgnoreMetricValues(metricNames ...string) MetricsCompareOption
IgnoreMetricValues is a MetricsCompareOption that clears all metric values.
func IgnoreSubsequentDataPoints ¶
func IgnoreSubsequentDataPoints(metricNames ...string) MetricsCompareOption
IgnoreSubsequentDataPoints is a MetricsCompareOption that ignores data points after the first.