Skip to content

Commit 20e2400

Browse files
Wise-WizardJaredTan95
authored andcommitted
Ensure similar naming for storage write metrics (jaegertracing#5798)
**Which problem is this PR solving?** This PR addresses a part of the issue [jaegertracing#5633 ](jaegertracing#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 <[email protected]> Signed-off-by: Jared Tan <[email protected]>
1 parent 866d8ea commit 20e2400

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/jaeger/internal/extension/jaegerstorage/extension.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414

1515
"github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter"
1616
"github.com/jaegertracing/jaeger/internal/metrics/otelmetrics"
17+
"github.com/jaegertracing/jaeger/pkg/metrics"
1718
"github.com/jaegertracing/jaeger/plugin/metrics/prometheus"
1819
"github.com/jaegertracing/jaeger/plugin/storage/badger"
1920
"github.com/jaegertracing/jaeger/plugin/storage/cassandra"
@@ -112,7 +113,8 @@ func newStorageExt(config *Config, telset component.TelemetrySettings) *storageE
112113
}
113114

114115
func (s *storageExt) Start(_ context.Context, _ component.Host) error {
115-
mf := otelmetrics.NewFactory(s.telset.MeterProvider)
116+
baseFactory := otelmetrics.NewFactory(s.telset.MeterProvider)
117+
mf := baseFactory.Namespace(metrics.NSOptions{Name: "jaeger"})
116118
for storageName, cfg := range s.config.Backends {
117119
s.telset.Logger.Sugar().Infof("Initializing storage '%s'", storageName)
118120
var factory storage.Factory

0 commit comments

Comments
 (0)