From 075d5a895119bd06c370bc663b5eed849a52de54 Mon Sep 17 00:00:00 2001 From: Sam Davies Date: Fri, 8 Nov 2024 10:33:45 -0500 Subject: [PATCH] Some logging improvements for LLO --- core/services/llo/data_source.go | 9 +++++++-- core/services/ocrcommon/telemetry.go | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/services/llo/data_source.go b/core/services/llo/data_source.go index ef333f821a1..f48c5fedf74 100644 --- a/core/services/llo/data_source.go +++ b/core/services/llo/data_source.go @@ -157,7 +157,12 @@ func (d *dataSource) Observe(ctx context.Context, streamValues llo.StreamValues, errStrs[i] = e.String() failedStreamIDs[i] = e.streamID } - d.lggr.Warnw("Observation failed for streams", "failedStreamIDs", failedStreamIDs, "errs", errStrs, "configDigest", opts.ConfigDigest(), "seqNr", opts.OutCtx().SeqNr) + successes := make([]streams.StreamID, 0, len(streamValues)) + for strmID := range streamValues { + successes = append(successes, strmID) + } + sort.Slice(successes, func(i, j int) bool { return successes[i] < successes[j] }) + d.lggr.Warnw("Observation failed for streams", "successfulStreamIDs", successes, "failedStreamIDs", failedStreamIDs, "errs", errStrs, "configDigest", opts.ConfigDigest(), "seqNr", opts.OutCtx().SeqNr) } if opts.VerboseLogging() { @@ -166,7 +171,7 @@ func (d *dataSource) Observe(ctx context.Context, streamValues llo.StreamValues, successes = append(successes, strmID) } sort.Slice(successes, func(i, j int) bool { return successes[i] < successes[j] }) - d.lggr.Debugw("Observation complete", "successfulStreamIDs", successes, "failedStreamIDs", failedStreamIDs, "configDigest", opts.ConfigDigest(), "values", streamValues, "seqNr", opts.OutCtx().SeqNr) + d.lggr.Infow("Observation complete", "successfulStreamIDs", successes, "failedStreamIDs", failedStreamIDs, "configDigest", opts.ConfigDigest(), "values", streamValues, "seqNr", opts.OutCtx().SeqNr) } return nil diff --git a/core/services/ocrcommon/telemetry.go b/core/services/ocrcommon/telemetry.go index e20b2485d86..58e57950cd3 100644 --- a/core/services/ocrcommon/telemetry.go +++ b/core/services/ocrcommon/telemetry.go @@ -164,7 +164,6 @@ func ParseMercuryEATelemetry(lggr logger.Logger, trrs pipeline.TaskRunResults, f bridgeRawResponse, ok := trr.Result.Value.(string) if !ok { - lggr.Warnw(fmt.Sprintf("cannot get bridge response from bridge task, id=%s, name=%q, expected string got %T", trr.Task.DotID(), bridgeName, trr.Result.Value), "dotID", trr.Task.DotID(), "bridgeName", bridgeName) continue } eaTelem, err := parseEATelemetry([]byte(bridgeRawResponse))