grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
60.95k stars 11.63k forks source link

Introduce Comparator interface #88016

Closed leonorfmartins closed 3 days ago

leonorfmartins commented 2 weeks ago

What is this feature?

This PR introduces a comparator interface which will allow to compare returned objects from both stores and assert on its equality. This comparator can later be called on each dualwriter and its result pushed to metrics (defined here)

Why do we need this feature?

[Add a description of the problem the feature is trying to solve.]

Who is this feature for?

[Add information on what kind of user the feature is for.]

Which issue(s) does this PR fix?:

Relates to https://github.com/grafana/search-and-storage-team/issues/37

Special notes for your reviewer:

Please check that:

diegommm commented 1 week ago

LGTM, some tests are failing though.

suntala commented 1 week ago

LGTM as well. Was there any discussion about what we might want to return? For instance, returning some kind of struct which provides a full accounting of which fields were a match and which ones were not?