Make translatorMetricFromOtelMetric public (#16683)
Some checks are pending
buf.build / lint and publish (push) Waiting to run
CI / Go tests (push) Waiting to run
CI / More Go tests (push) Waiting to run
CI / Go tests with previous Go version (push) Waiting to run
CI / UI tests (push) Waiting to run
CI / Go tests on Windows (push) Waiting to run
CI / Mixins tests (push) Waiting to run
CI / Build Prometheus for common architectures (push) Waiting to run
CI / Build Prometheus for all architectures (push) Waiting to run
CI / Report status of build Prometheus for all architectures (push) Blocked by required conditions
CI / Check generated parser (push) Waiting to run
CI / golangci-lint (push) Waiting to run
CI / fuzzing (push) Waiting to run
CI / codeql (push) Waiting to run
CI / Publish main branch artifacts (push) Blocked by required conditions
CI / Publish release artefacts (push) Blocked by required conditions
CI / Publish UI on npm Registry (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run

Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
This commit is contained in:
zenador 2025-06-03 18:39:21 +08:00 committed by GitHub
parent 8fd46f74aa
commit 40a27ce875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -771,7 +771,7 @@ func TestPrometheusConverter_addExponentialHistogramDataPoints(t *testing.T) {
Settings{
ExportCreatedMetric: true,
},
namer.Build(translatorMetricFromOtelMetric(metric)),
namer.Build(TranslatorMetricFromOtelMetric(metric)),
pmetric.AggregationTemporalityCumulative,
)
require.NoError(t, err)
@ -1143,7 +1143,7 @@ func TestPrometheusConverter_addCustomBucketsHistogramDataPoints(t *testing.T) {
ExportCreatedMetric: true,
ConvertHistogramsToNHCB: true,
},
namer.Build(translatorMetricFromOtelMetric(metric)),
namer.Build(TranslatorMetricFromOtelMetric(metric)),
pmetric.AggregationTemporalityCumulative,
)

View file

@ -65,7 +65,7 @@ func NewPrometheusConverter() *PrometheusConverter {
}
}
func translatorMetricFromOtelMetric(metric pmetric.Metric) otlptranslator.Metric {
func TranslatorMetricFromOtelMetric(metric pmetric.Metric) otlptranslator.Metric {
m := otlptranslator.Metric{
Name: metric.Name(),
Unit: metric.Unit(),
@ -144,7 +144,7 @@ func (c *PrometheusConverter) FromMetrics(ctx context.Context, md pmetric.Metric
continue
}
promName := namer.Build(translatorMetricFromOtelMetric(metric))
promName := namer.Build(TranslatorMetricFromOtelMetric(metric))
c.metadata = append(c.metadata, prompb.MetricMetadata{
Type: otelMetricTypeToPromMetricType(metric),
MetricFamilyName: promName,

View file

@ -49,7 +49,7 @@ func TestFromMetrics(t *testing.T) {
for k := 0; k < metricSlice.Len(); k++ {
metric := metricSlice.At(k)
namer := otlptranslator.MetricNamer{}
promName := namer.Build(translatorMetricFromOtelMetric(metric))
promName := namer.Build(TranslatorMetricFromOtelMetric(metric))
expMetadata = append(expMetadata, prompb.MetricMetadata{
Type: otelMetricTypeToPromMetricType(metric),
MetricFamilyName: promName,