Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FFM-8400) Metrics sending error log level #120

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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