You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
In production, we have processes uploading metrics via an API I created, which causes duplication of datas.
I did a workaround locally (using database migrations in the API), to alter a bit the structure:
prometheus.insert_view_normal(), at line 149 :pg_prometheus/sql/prometheus.sql
Line 149 in 06b4c83
Transforming this line as :
EXECUTE format('INSERT INTO %I (time, value, labels_id) VALUES (%L, %L, %L) ON CONFLICT DO NOTHING',so the unique constraint allow to push metrics, and no duplicates to be found afterwards.
Does this qualify to be proposed as a PR ?