Skip to content

Commit

Permalink
update log statements so that Kibana can index them
Browse files Browse the repository at this point in the history
resolves the conflict between and integer status field (e.g. http status) and a string one (run status)
  • Loading branch information
jharting committed Aug 27, 2021
1 parent d6f90c7 commit 4cdcaad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/response-consumer/instrumentation/probes.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ const (
)

func PlaybookRunUpdated(ctx context.Context, status string, runId uuid.UUID) {
utils.GetLogFromContext(ctx).Infow("Updated run", "status", status, "run_id", runId.String())
utils.GetLogFromContext(ctx).Infow("Updated run", "runStatus", status, "run_id", runId.String())
playbookRunUpdatedTotal.Inc()
}

func PlaybookRunUpdateMiss(ctx context.Context, status string) {
utils.GetLogFromContext(ctx).Warnw("No run to update", "status", status)
utils.GetLogFromContext(ctx).Warnw("No run to update", "runStatus", status)
playbookRunUpdateMissTotal.Inc()
}

func PlaybookRunUpdateError(ctx context.Context, err error, status string, runId uuid.UUID) {
utils.GetLogFromContext(ctx).Errorw("Error updating run", "status", status, "error", err, "run_id", runId.String())
utils.GetLogFromContext(ctx).Errorw("Error updating run", "runStatus", status, "error", err, "run_id", runId.String())
errorTotal.WithLabelValues(labelDbUpdate).Inc()
}

Expand Down

0 comments on commit 4cdcaad

Please sign in to comment.