Skip to content

fix(opentelemetry-exporter-prometheus): handle additional edge cases in metric name conversion#6727

Open
cjihrig wants to merge 2 commits into
open-telemetry:mainfrom
cjihrig:prom-edge-cases
Open

fix(opentelemetry-exporter-prometheus): handle additional edge cases in metric name conversion#6727
cjihrig wants to merge 2 commits into
open-telemetry:mainfrom
cjihrig:prom-edge-cases

Conversation

@cjihrig
Copy link
Copy Markdown
Contributor

@cjihrig cjihrig commented May 19, 2026

Which problem is this PR solving?

There are a few edge cases that are not handled when converting OTel metric names to Prometheus metric names.

Fixes # #6653 (comment)

Short description of the changes

This commit addresses the cases of:

  • An empty metric name.
  • A metric name that collapses to a single _.
  • Metric names that begin with a digit.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added

Copy link
Copy Markdown
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! PS: non-js developer here

Comment thread experimental/CHANGELOG.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants