Skip to content

Commit

Permalink
fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
e-dard committed Sep 15, 2023
1 parent 1b2e1e5 commit b94921e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions processor/probabilisticsamplerprocessor/logsprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

}
Expand Down

0 comments on commit b94921e

Please sign in to comment.