From b94921ee9c884751fc880ec3abc2b2d3f6654ded Mon Sep 17 00:00:00 2001 From: Edd Robinson Date: Fri, 15 Sep 2023 14:03:28 +0100 Subject: [PATCH] fix test case --- processor/probabilisticsamplerprocessor/logsprocessor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/processor/probabilisticsamplerprocessor/logsprocessor.go b/processor/probabilisticsamplerprocessor/logsprocessor.go index d41d03916486..3701679744fb 100644 --- a/processor/probabilisticsamplerprocessor/logsprocessor.go +++ b/processor/probabilisticsamplerprocessor/logsprocessor.go @@ -52,7 +52,6 @@ func (lsp *logSamplerProcessor) processLogs(ctx context.Context, ld plog.Logs) ( ld.ResourceLogs().RemoveIf(func(rl plog.ResourceLogs) bool { rl.ScopeLogs().RemoveIf(func(ill plog.ScopeLogs) bool { ill.LogRecords().RemoveIf(func(l plog.LogRecord) bool { - tagPolicyValue := "always_sampling" // pick the sampling source. var lidBytes []byte @@ -71,8 +70,10 @@ func (lsp *logSamplerProcessor) processLogs(ctx context.Context, ld plog.Logs) ( case pcommon.ValueTypeBytes: lidBytes = value.Bytes().AsRaw() default: - lsp.logger.Warn("incompatible log record attribute, only String or Bytes supported; skipping log record", + lsp.logger.Warn("Incompatible log record attribute, only String or Bytes supported; skipping log record", zap.String("log_record_attribute", lsp.samplingSource), zap.Stringer("attribute_type", value.Type())) + + return true } }