Skip to content

Backport release/v6.6: fix(metrics): Prometheus metrics output#3673

Merged
philipsu522 merged 1 commit into
release/v6.6from
backport-3640-to-release/v6.6
Jun 30, 2026
Merged

Backport release/v6.6: fix(metrics): Prometheus metrics output#3673
philipsu522 merged 1 commit into
release/v6.6from
backport-3640-to-release/v6.6

Conversation

@seidroid

@seidroid seidroid Bot commented Jun 30, 2026

Copy link
Copy Markdown

Backport of #3640 to release/v6.6.

After the `sei-chain` to `sei_chain` prefix change in #3554, it surfaced
that otel labels also had invalid Prometheus label characters ('.')

Tested on local Sei node, with this patch the Prometheus remote write
endpoint no longer drops any metrics from the node.

Example before:
```
curl -si -H "Accept: application/openmetrics-text;version=1.0.0;escaping=allow-utf-8" http://127.0.0.1:26660/metrics | grep 'telemetry.sdk.language'
target_info{"service.name"="unknown_service:seid","telemetry.sdk.language"="go","telemetry.sdk.name"="opentelemetry","telemetry.sdk.version"="1.39.0"} 1
```

after:
```
 curl -si -H "Accept: application/openmetrics-text;version=1.0.0;escaping=allow-utf-8" http://127.0.0.1:26660/metrics | grep 'telemetry.sdk.language'
target_info{service_name="unknown_service:seid",telemetry_sdk_language="go",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="1.39.0"} 1

```

---------

Co-authored-by: Philip Su <philip.su.522@gmail.com>
(cherry picked from commit 2378fca)
@cursor

cursor Bot commented Jun 30, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only naming change for exported metrics; may shift existing dashboard queries until they use the new names.

Overview
Aligns OpenTelemetry-to-Prometheus export with underscore escaping and unit suffixes so scraped metric names match expected Prometheus conventions (backport of #3640).

Both OTel Prometheus setup paths now pass WithTranslationStrategy(otlptranslator.UnderscoreEscapingWithSuffixes) when creating the exporter: sei-db SetupOtelPrometheus and utils SetupOtelMetricsProvider (still namespaced sei_chain). github.com/prometheus/otlptranslator is added as a direct module dependency to support the import.

Reviewed by Cursor Bugbot for commit 5ab8f40. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJun 30, 2026, 4:36 PM

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 58.00%. Comparing base (5ed245f) to head (5ab8f40).

Files with missing lines Patch % Lines
sei-db/common/metrics/setup.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           release/v6.6    #3673      +/-   ##
================================================
- Coverage         58.88%   58.00%   -0.88%     
================================================
  Files              2225     2151      -74     
  Lines            183482   174939    -8543     
================================================
- Hits             108041   101481    -6560     
+ Misses            65733    64450    -1283     
+ Partials           9708     9008     -700     
Flag Coverage Δ
sei-chain-pr 35.84% <80.00%> (?)
sei-db 70.41% <ø> (-0.22%) ⬇️
sei-db-state-db ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
utils/metrics/metrics_util.go 88.55% <100.00%> (+0.17%) ⬆️
sei-db/common/metrics/setup.go 0.00% <0.00%> (ø)

... and 75 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@philipsu522 philipsu522 enabled auto-merge (squash) June 30, 2026 16:44
@philipsu522 philipsu522 merged commit 8706fac into release/v6.6 Jun 30, 2026
64 of 66 checks passed
@philipsu522 philipsu522 deleted the backport-3640-to-release/v6.6 branch June 30, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants