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

fix(metrics-operator): improve error handling in metrics providers #1466

Merged
merged 7 commits into from
May 30, 2023
Prev Previous commit
Next Next commit
Update metrics-operator/controllers/common/providers/dynatrace/dynatr…
…ace.go

Co-authored-by: Giovanni Liva <giovanni.liva@dynatrace.com>
Signed-off-by: RealAnna <89971034+RealAnna@users.noreply.github.com>
RealAnna and thisthat authored May 25, 2023
commit ed312095fd032bf1b7651a1db6929f709f7ac531
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ func (d *KeptnDynatraceProvider) EvaluateQuery(ctx context.Context, metric metri
}
if !reflect.DeepEqual(result.Error, Error{}) {
err = fmt.Errorf(ErrAPI, result.Error.Message)
RealAnna marked this conversation as resolved.
Show resolved Hide resolved
d.Log.Error(err, "Error from provider")
d.Log.Error(err, "Error from Dynatrace provider")
return "", b, err
}
r := fmt.Sprintf("%f", d.getSingleValue(result))