Skip to content

Commit

Permalink
feat: added some debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ReuDa committed Jul 25, 2024
1 parent e759123 commit 5d3535b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extmonitor/monitor_status_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"context"
"fmt"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV1"
"github.com/rs/zerolog/log"
"github.com/steadybit/action-kit/go/action_kit_api/v2"
"github.com/steadybit/action-kit/go/action_kit_sdk"
"github.com/steadybit/extension-datadog/config"
Expand Down Expand Up @@ -262,6 +263,7 @@ func MonitorStatusCheckStatus(ctx context.Context, state *MonitorStatusCheckStat
completed := now.After(state.End)
var checkError *action_kit_api.ActionKitError
if len(state.ExpectedStatus) > 0 && monitor.OverallState != nil {
log.Debug().Str("monitor", *monitor.Name).Str("status", extutil.ToString(*monitor.OverallState)).Strs("expected", state.ExpectedStatus).Msg("Monitor status")
if state.StatusCheckMode == statusCheckModeAllTheTime {
if !slices.Contains(state.ExpectedStatus, string(*monitor.OverallState)) {
tags := strings.Join(monitor.Tags, ", ")
Expand Down

0 comments on commit 5d3535b

Please sign in to comment.