Skip to content

Commit

Permalink
Merge pull request #120 from harness/FFM-8400-metrics-log-level
Browse files Browse the repository at this point in the history
(FFM-8400) Metrics sending error log level
  • Loading branch information
conormurray95 committed Aug 2, 2023
2 parents 4084fb2 + d278282 commit c029419
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions analyticsservice/analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,15 +265,15 @@ func (as *AnalyticsService) sendDataAndResetCache(ctx context.Context) {

resp, err := mClient.PostMetricsWithResponse(ctx, metricsclient.EnvironmentPathParam(as.environmentID), analyticsPayload)
if err != nil {
as.logger.Error(err)
as.logger.Warn(err)
return
}
if resp == nil {
as.logger.Error("Empty response from metrics server")
as.logger.Warn("Empty response from metrics server")
return
}
if resp.StatusCode() != 200 {
as.logger.Errorf("Non 200 response from metrics server: %d", resp.StatusCode())
as.logger.Warn("Non 200 response from metrics server: %d", resp.StatusCode())
return
}

Expand Down

0 comments on commit c029419

Please sign in to comment.