Skip to content

Conversation

yzang2019
Copy link
Contributor

@yzang2019 yzang2019 commented Oct 6, 2025

Describe your changes and provide context

This PR is adding otel metrics provider so that we can add otel metrics in other sub modules.
Remove duplicate integration test.

Testing performed to validate your change

)

func SetupOtelMetricsProvider() error {
metricsExporter, err := prometheus.New(prometheus.WithNamespace("seidb"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does that namespace make sense here?

Copy link
Contributor Author

@yzang2019 yzang2019 Oct 6, 2025

Choose a reason for hiding this comment

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

ah yeah, need to fix it, good catch!

// Bind OTEL metrics provider
err := metricutils.SetupOtelMetricsProvider()
if err != nil {
logger.Error(err.Error())
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am curious why log the error instead of erroring out. We probably don't want this failure to be scilent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just wanna be cautious here since it's something new, here we don't panic because I don't wanna sei-chain to crash just due to this new metric provider. We can switch to error out later in the future when we refactor the metrics framework

@yzang2019 yzang2019 requested a review from masih October 6, 2025 12:52
* main:
  Removed Transport mock (#2431)
  Fix to tcp connection leak (#2442)
  Unify code coverage configuration (#2441)
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.46%. Comparing base (d9e851f) to head (e05afbf).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
utils/metrics/metrics_util.go 57.14% 2 Missing and 1 partial ⚠️

❌ Your project status has failed because the head coverage (47.21%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2443      +/-   ##
==========================================
- Coverage   51.48%   51.46%   -0.02%     
==========================================
  Files        1541     1541              
  Lines      156492   156504      +12     
==========================================
- Hits        80572    80549      -23     
- Misses      69833    69859      +26     
- Partials     6087     6096       +9     
Flag Coverage Δ
sei-chain 27.55% <45.45%> (-0.01%) ⬇️
sei-cosmos 51.41% <ø> (+<0.01%) ⬆️
sei-tendermint 58.50% <ø> (-0.09%) ⬇️
sei-wasmd 51.41% <100.00%> (ø)

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

Files with missing lines Coverage Δ
app/app.go 77.30% <100.00%> (+0.07%) ⬆️
sei-cosmos/baseapp/baseapp.go 70.36% <ø> (ø)
utils/metrics/metrics_util.go 66.94% <57.14%> (-0.30%) ⬇️

... and 14 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.

@yzang2019 yzang2019 merged commit 2384832 into main Oct 7, 2025
93 of 94 checks passed
@yzang2019 yzang2019 deleted the yzang/add-otel-metrics branch October 7, 2025 04:58
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.

4 participants