Skip to content

Commit

Permalink
Remove some overly verbose debug logging
Browse files Browse the repository at this point in the history
When DEBUG level is enabled, the logs are flooded with the contents
of all the logs collector is shipping which makes them to noisy
to be useful.
  • Loading branch information
jwilder committed Feb 5, 2025
1 parent bdb3b2e commit a8d1612
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions storage/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
transform2 "github.com/Azure/adx-mon/transform"
gbp "github.com/libp2p/go-buffer-pool"
"github.com/prometheus/client_golang/prometheus"
"google.golang.org/protobuf/encoding/protojson"
)

var (
Expand Down Expand Up @@ -157,11 +156,6 @@ func (s *LocalStore) WriteOTLPLogs(ctx context.Context, database, table string,

if logger.IsDebug() {
logger.Debugf("Store received %d logs for %s.%s", len(logs.Logs), sanitizedDB, sanitizedTable)
for _, log := range logs.Logs {
if l, err := protojson.Marshal(log); err == nil {
logger.Debugf("Log: %s", l)
}
}
}

key = fmt.Appendf(key[:0], "%s_%s", sanitizedDB, sanitizedTable)
Expand All @@ -178,10 +172,6 @@ func (s *LocalStore) WriteOTLPLogs(ctx context.Context, database, table string,
return err
}

if logger.IsDebug() {
logger.Debugf("Marshaled logs: %s", enc.Bytes())
}

wo := wal.WithSampleMetadata(wal.LogSampleType, uint32(len(logs.Logs)))
if err := w.Write(ctx, enc.Bytes(), wo); err != nil {
return err
Expand Down

0 comments on commit a8d1612

Please sign in to comment.