feat(metrics): migrate app/legacyabci, loadtest, utils/logging, wasmbinding to OpenTelemetry#3446
Conversation
PR SummaryMedium Risk Overview
Reviewed by Cursor Bugbot for commit bc0a6eb. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3446 +/- ##
=======================================
Coverage 59.29% 59.30%
=======================================
Files 2125 2128 +3
Lines 175629 175634 +5
=======================================
+ Hits 104144 104155 +11
+ Misses 62404 62395 -9
- Partials 9081 9084 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9ccc1c6. Configure here.
| // Generate a message type first | ||
| messageType := c.getRandomMessageType(config.MessageTypes) | ||
| metrics.IncrProducerEventCount(messageType) | ||
| loadtestMetrics.produceCount.Add(context.Background(), 1, otelmetric.WithAttributes(attribute.String("msg_type", messageType))) |
There was a problem hiding this comment.
For loadtest, replaced the metrics as it is only for test and no need to emit dual metrics.
| // reraise panic in main goroutine | ||
| panic(err) | ||
| case <-time.After(after): | ||
| metrics.IncrLogIfNotDoneAfter(label) |
There was a problem hiding this comment.
This function LogIfNotDoneAfter is only used in tests, so no need for keeping the older metric.
| // Metric Names: | ||
| // | ||
| // sei_log_not_done_after_counter | ||
| func IncrLogIfNotDoneAfter(label string) { |
There was a problem hiding this comment.
removed functions that were only used in tests.
| } | ||
| } | ||
|
|
||
| func MetricsPanicCallback(err any, ctx sdk.Context, key string) { |
There was a problem hiding this comment.
Unused function.

Adds OTel instrumentation to
app/legacyabci,loadtest,utils/logging, andwasmbindingfollowing the same pattern as PLT-329, PLT-330, and PLT-339 (#3439).New instruments
app/legacyabci (meter
legacyabci)begin_blocker_duration— histogram, seconds, fine-grained buckets; dual-emit TODO(PLT-343)ibc_begin_blocker_duration— histogram, seconds, fine-grained buckets; dual-emit TODO(PLT-343)tx_duration— histogram, seconds,modelabel (check/recheck/deliver); dual-emit TODO(PLT-343)loadtest (meter
loadtest)produce— counter,msg_typelabel (replacesmetrics.IncrProducerEventCount)consume— counter,msg_typelabel (replacesmetrics.IncrConsumerEventCount)tps— gauge,msg_typelabel (replacesmetrics.SetThroughputMetricByType)utils/logging (meter
utils_logging)log_not_done_after— counter,labellabel (replacesmetrics.IncrLogIfNotDoneAfter)wasmbinding (meter
wasmbinding)wasm_query_association_error— counter,scenario+typelabels (replacesmetrics.IncrementErrorMetrics)wasm_query_sdk_error— counter,scenario+codespace+codelabels (new; fires for any structured SDK error that is not an association error)Notes
loadtestandutils/logging(only used for tests) are direct replacement with no dual-emit — legacy calls removed entirely.app/legacyabciuses dual-emit withTODO(PLT-343)comments pending dashboard verification.utils/panic.MetricsPanicCallbackwas unused and removed as part of this cleanup.