Skip to content

Remove legacy go-metrics telemetry superseded by OTel (PLT-353) - #4081

Merged
amir-deris merged 2 commits into
mainfrom
amir/plt-353-metric-cleanup
Sep 3, 2026
Merged

Remove legacy go-metrics telemetry superseded by OTel (PLT-353)#4081
amir-deris merged 2 commits into
mainfrom
amir/plt-353-metric-cleanup

Conversation

@amir-deris

@amir-deris amir-deris commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Describe your changes and provide context

Removes the legacy go-metrics/telemetry emissions that were kept alongside the OTel
instrumentation during the PLT-353 migration. The OTel equivalents (baseapp_*, storev2,
scheduler, and module metrics) have been verified in place, so the duplicate emitters and
their TODO(PLT-353) markers are now deleted.

Removed from:

  • baseapp — ABCI duration/tx count/gas gauges, throughput measures
  • storev2/rootmulti — commit latency, SS version, historical query counters, store-size gauges, state-sync key counter
  • store/types — cache eviction gauge, gas error counter
  • tasks/scheduler — retry/incarnation counters
  • x/{auth/vesting,bank,distribution,gov,staking,upgrade} — msg-server and begin-blocker telemetry
  • telemetry/wrapper.go — now-unused MeasureSinceWithLabels and MessageCount

No behavior change beyond metric emission.

Testing performed to validate your change

  • go build ./... and go vet ./...
  • Package tests for the touched packages (baseapp, store/..., tasks, x/...)
  • Confirmed no remaining TODO(PLT-353) references in the tree that is safe to remove for V6.6.

@amir-deris amir-deris self-assigned this Sep 2, 2026
@amir-deris amir-deris changed the title Amir/plt 353 metric cleanup Remove legacy go-metrics telemetry superseded by OTel (PLT-353) Sep 2, 2026
@amir-deris
amir-deris force-pushed the amir/plt-353-metric-cleanup branch from 027c6b5 to 0e71518 Compare September 2, 2026 16:52
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedSep 3, 2026, 8:51 AM

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.13%. Comparing base (2e256b5) to head (bbff5a4).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4081      +/-   ##
==========================================
- Coverage   61.30%   60.13%   -1.18%     
==========================================
  Files        2178     2069     -109     
  Lines      190826   177972   -12854     
==========================================
- Hits       116990   107024    -9966     
+ Misses      62807    60980    -1827     
+ Partials    11029     9968    -1061     
Flag Coverage Δ
sei-chain-pr 73.65% <100.00%> (?)
sei-db 70.02% <ø> (+0.21%) ⬆️
sei-db-state-db ?

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

Files with missing lines Coverage Δ
sei-cosmos/baseapp/abci.go 65.26% <100.00%> (-0.49%) ⬇️
sei-cosmos/baseapp/baseapp.go 76.28% <ø> (-1.08%) ⬇️
sei-cosmos/store/types/cache.go 68.75% <ø> (-3.48%) ⬇️
sei-cosmos/store/types/gas.go 90.06% <ø> (-0.32%) ⬇️
sei-cosmos/storev2/rootmulti/store.go 69.24% <ø> (-1.19%) ⬇️
sei-cosmos/tasks/scheduler.go 95.27% <ø> (-0.04%) ⬇️
sei-cosmos/telemetry/wrapper.go 100.00% <ø> (ø)
sei-cosmos/x/bank/keeper/msg_server.go 81.48% <ø> (-1.57%) ⬇️
sei-cosmos/x/distribution/keeper/msg_server.go 44.30% <ø> (-6.26%) ⬇️
sei-cosmos/x/gov/keeper/msg_server.go 78.94% <ø> (-3.96%) ⬇️
... and 3 more

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

@amir-deris
amir-deris marked this pull request as ready for review September 3, 2026 08:41
@cursor

cursor Bot commented Sep 3, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Observability-only cleanup with no auth, state, or consensus behavior changes; risk is limited to metric naming gaps if OTel parity was not fully validated in production.

Overview
Completes the PLT-353 telemetry migration by removing duplicate go-metrics / telemetry emissions that ran alongside OpenTelemetry. OTel instruments (baseappMetrics, storev2Metrics, module metrics, etc.) are unchanged and remain the sole emitters for those signals.

Scope of removal: ABCI and tx path timings and counters in baseapp; bounded-cache eviction and gas-exceeded counters in store/types; commit latency, historical query, IAVL size gauges, and state-sync key counter in storev2/rootmulti; OCC scheduler retry/incarnation counters in tasks; msg-server and upgrade begin-blocker telemetry in x/bank, x/distribution, x/gov, x/staking, and x/upgrade. Unused telemetry/wrapper helpers (MeasureSinceWithLabels, MessageCount) are dropped.

Operational note: Dashboards or alerts still keyed on the old metric names will stop receiving those series; operators should use the verified OTel metric names instead. No change to chain logic beyond metric emission.

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

@amir-deris

Copy link
Copy Markdown
Contributor Author

@seidroid review

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pure-deletion PR removing legacy go-metrics emitters that duplicate existing OTel instrumentation; every removed emitter has a retained OTel counterpart and no removed helper (MeasureSinceWithLabels, MessageCount) or import is still referenced. Only non-blocking issues: the PLT-353 cleanup is incomplete relative to the PR description, and a few legacy labels have no OTel equivalent.

Findings: 0 blocking | 3 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • [suggestion] The PLT-353 cleanup is incomplete despite the description's claim that no TODO(PLT-353) references remain. Still present: sei-cosmos/store/gaskv/store.go:102 and :119 (Has/Delete duration), sei-cosmos/x/bank/keeper/send.go:196 (new_account), giga/deps/tasks/scheduler.go:290,293, giga/deps/xbank/keeper/metrics.go:60, and utils/metrics/metrics_util.go:92. Either finish them here or narrow the description. (Also, x/auth/vesting is listed under "removed from" but contains no telemetry calls and is not in the diff.)
  • [suggestion] app/abci.go:291 still carries the comment // legacy: telemetry.MeasureSince in sei-cosmos/baseapp/abci.go TODO(PLT-353), which now points at code this PR deleted. Worth dropping in the same change.
  • [suggestion] A few labels present on the deleted legacy emitters have no OTel counterpart, so this is a real (probably intentional) loss of dashboard granularity worth confirming with whoever owns the alerts: gov vote/deposit lose proposal_id (govMetrics.voteTotal/depositTotal take no attributes), upgrade plan height loses info, bank/distribution/staking amounts move from denom to denom_class, and abci.query moves from raw req.Path to the normalized route.

@seidroid seidroid Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pure-deletion PR removing legacy go-metrics emitters that duplicated existing OTel instrumentation; every deleted emitter has a retained OTel counterpart, no removed helper (MeasureSinceWithLabels, MessageCount) or import is still referenced, and no test depends on the legacy sink. No blocking issues — the same three non-blocking notes from the prior review still apply since the head commit is unchanged.

Findings: 0 blocking | 3 non-blocking | 0 posted inline

Blockers

  • None at the file/PR level.

Non-blocking

  • [suggestion] The PLT-353 cleanup is still incomplete relative to the description's claim that "no remaining TODO(PLT-353) references" exist in the tree. Verified still present on this head: sei-cosmos/store/gaskv/store.go:102 and :119 (Has/Delete duration), sei-cosmos/x/bank/keeper/send.go:196 (new_account), utils/metrics/metrics_util.go:92, giga/deps/tasks/scheduler.go:290,293, and giga/deps/xbank/keeper/metrics.go:60. Note giga/deps/tasks/scheduler.go is a near-copy of sei-cosmos/tasks/scheduler.go, which this PR does clean up — leaving the two divergent is the most surprising omission. Either finish these here or narrow the description. (Also, x/auth/vesting is listed under "removed from" but has no telemetry calls and is not in the diff.)
  • [suggestion] app/abci.go:291 still carries // legacy: telemetry.MeasureSince in sei-cosmos/baseapp/abci.go TODO(PLT-353), which now points at code this PR deletes (baseapp/abci.go Commit). Worth dropping in the same change so the comment doesn't outlive its referent.
  • [suggestion] A few labels on the deleted legacy emitters have no OTel counterpart, so this is a real (likely intentional) loss of dashboard granularity worth confirming with whoever owns the alerts: gov vote/deposit lose proposal_id (govMetrics.voteTotal/depositTotal take no attributes), upgrade plan height loses info (both x/upgrade/abci.go and keeper.ScheduleUpgrade), bank/distribution/staking amounts move from denom to denom_class, and abci.query moves from the raw req.Path to the normalized route.

@amir-deris
amir-deris enabled auto-merge September 3, 2026 09:12
@amir-deris
amir-deris added this pull request to the merge queue Sep 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 3, 2026
@amir-deris
amir-deris added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit d62506b Sep 3, 2026
74 checks passed
@amir-deris
amir-deris deleted the amir/plt-353-metric-cleanup branch September 3, 2026 12:27
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.

2 participants