Skip to content

Commit

Permalink
telemetry: add 204 as success status code (#3772)
Browse files Browse the repository at this point in the history
Signed-off-by: bingyuyap <[email protected]>
  • Loading branch information
bingyuyap authored Feb 8, 2024
1 parent bcb0a7e commit eee4641
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/pkg/telemetry/prom_remote_write/scrape.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func ScrapeAndSendLocalMetrics(ctx context.Context, info PromTelemetryInfo, logg
}

logger.Debug("Grafana result", zap.Int("status code", res.StatusCode))
if res.StatusCode != 200 {
logger.Error("Grafana returned non-200 status code", zap.Int("status code", res.StatusCode))
if res.StatusCode != 200 && res.StatusCode != 204 {
logger.Error("Grafana returned a status code other than 200 or 204", zap.Int("status code", res.StatusCode))
return err
}
return nil
Expand Down

1 comment on commit eee4641

@hknnr
Copy link

@hknnr hknnr commented on eee4641 Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Please sign in to comment.