Skip to content

Commit

Permalink
Some logging improvements for LLO
Browse files Browse the repository at this point in the history
  • Loading branch information
samsondav committed Nov 8, 2024
1 parent 340a6bf commit 075d5a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions core/services/llo/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion core/services/ocrcommon/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 075d5a8

Please sign in to comment.