12 Commits

Author SHA1 Message Date
0764ecb98d K8s/DualWriter: Use dualwriter package for all dual writers (#101393) 2025-03-01 21:26:14 +03:00
4a60f29709 UniStore: register dual_writer_data_syncer_outcome metric (#94789)
Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
2024-10-16 16:44:20 +03:00
bfd3506549 UniStore: Enable DataSyncer in Mode1 + better logging (#94688)
* UniStore: Enable DataSyncer Mode1 + better logging

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>

---------

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
2024-10-15 06:41:12 +03:00
66e0121dd5 Pass resource name into the dual writer initialization (#92654) 2024-08-29 13:30:48 +02:00
de2c9a06bf Unified Storage: First iteration Dual Write Syncer (#89809)
* Unified Storage: First iteration Dual Write Syncer

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
Co-authored-by: Leonor Oliveira <9090754+leonorfmartins@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2024-08-27 13:31:40 -03:00
6a1e835f12 Get kind from runtime.Object. Unify metric names (#91041)
* Normalize name labels

* Access kind

* Read kind from the runtime object instead from the options object

* use kind from object on create
2024-07-29 09:58:48 +02:00
d0afa60feb Remove unused metric (#90327) 2024-07-11 15:31:37 +02:00
b75276c641 Fix outcome metric (#90322) 2024-07-11 13:50:20 +02:00
ec6a939815 Compare results when reading/writing between unified_storage and legacy (#89773)
* Compare results when reading/writing between unified_storage and legacy

* Always use name when comparing objects

* Compare on get method

* Update pkg/apiserver/rest/dualwriter.go

Co-authored-by: Dan Cech <dcech@grafana.com>

* Add new metric to count how many times we read from legacy in mode 2

* Move counter

* Add name in mode1

---------

Co-authored-by: Dan Cech <dcech@grafana.com>
2024-07-05 14:01:05 +02:00
fd44f2ee4f Init dualwriter metrics (#89003)
* Pass prometheus registerer to the dual writer

* Fix tests

* Remove unused var

* Fix tests

* Uncomment test

* Remove leading line

* Fix tests. Reuse registerer if there's already one

* Lint

* Improve double registering logic

* Rebase main
2024-06-14 11:01:49 +02:00
dd771e818e Also call storage on mode1. Measure latency (#87739)
* Also call storage on mode1. Add metrics

* Update comment

* Don't use compare function for now

* Remove very important space

* Finish add logging in mode2.
Also call US in mode1 in a non blocking way

* Improve code readability on modes 1 and 2

* Fix tests

* Rename vars

* Lint

* Return error from legacy write

* Renume useless defer

* [REVIEW] improvements

* Pass kind instead of name

* Use kind instead of name in metrics

* Only call latency metrics once

* Return error on writes to legacystore in mode1

* Move accesssor logic into the goroutine as well
2024-05-22 10:23:29 +02:00
b214f9cc3a Add metrics utils to the dualwriter (#87693)
* Add metrics utils

* Ignore lint temporarily

* Lint
2024-05-13 11:36:24 +02:00