From 371d1c858d1bb6688b77a36177681bf34540cd82 Mon Sep 17 00:00:00 2001 From: Saransh Shankar <103821431+Wise-Wizard@users.noreply.github.com> Date: Fri, 2 Aug 2024 05:18:59 +0530 Subject: [PATCH] Ensure similar naming for storage write metrics (#5798) **Which problem is this PR solving?** This PR addresses a part of the issue [#5633 ](https://github.com/jaegertracing/jaeger/issues/5633) **Description of the changes** This is a Draft PR to achieve Observability Parity in metrics between V1 and V2 components by configuring OTEL Collector to emit desired metrics. **How was this change tested?** The changes were tested by running the following command: ```bash make test ``` ```bash CI actions and compare.py script ``` **Checklist** - [x] I have read [CONTRIBUTING_GUIDELINES.md](https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md) - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - `for jaeger: make lint test` - `for jaeger-ui: yarn lint` and `yarn test` --------- Signed-off-by: Wise-Wizard Signed-off-by: nabil salah --- cmd/jaeger/internal/extension/jaegerstorage/extension.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension.go b/cmd/jaeger/internal/extension/jaegerstorage/extension.go index 5e8d1061349..3c9ce5684e8 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension.go @@ -14,6 +14,7 @@ import ( "github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter" "github.com/jaegertracing/jaeger/internal/metrics/otelmetrics" + "github.com/jaegertracing/jaeger/pkg/metrics" "github.com/jaegertracing/jaeger/plugin/metrics/prometheus" "github.com/jaegertracing/jaeger/plugin/storage/badger" "github.com/jaegertracing/jaeger/plugin/storage/cassandra" @@ -112,7 +113,8 @@ func newStorageExt(config *Config, telset component.TelemetrySettings) *storageE } func (s *storageExt) Start(_ context.Context, _ component.Host) error { - mf := otelmetrics.NewFactory(s.telset.MeterProvider) + baseFactory := otelmetrics.NewFactory(s.telset.MeterProvider) + mf := baseFactory.Namespace(metrics.NSOptions{Name: "jaeger"}) for storageName, cfg := range s.config.Backends { s.telset.Logger.Sugar().Infof("Initializing storage '%s'", storageName) var factory storage.Factory