Edit custom metric form renders query field in error state on open

Summary

Editing an existing custom metric renders the form with the query input field in error state. If the metric is being edited it means the query was previously valid.

Steps to reproduce

  1. Pre-req: A project with prometheus installed.
  2. Navigate to Settings > Integrations > Prometheus
  3. Select a custom metric to edit.
  4. Notice that the query input field is in error state.

What is the expected correct behavior?

Opening the custom metric edit form should not render the query form as error unless there is a real error.

Relevant logs and/or screenshots

edit_custom_metric

Assignee Loading
Time tracking Loading