feat: sidecar Prometheus metrics, RPC connection pooling, cleanup#62
Merged
feat: sidecar Prometheus metrics, RPC connection pooling, cleanup#62
Conversation
…Height consolidation Observability: - Prometheus metrics: seictl_task_duration_seconds (histogram), seictl_task_submissions_total, seictl_task_failures_total - /v0/metrics endpoint via promhttp.Handler() - Metrics instrumented in engine.execute and engine.Submit RPC connection pooling: - Comparator struct holds two *rpc.Client instances instead of endpoint strings. Constructed once in NewComparator, reused across all queryBlock/queryBlockResults/fetchRaw calls. - queryBlock, queryBlockResults, fetchRawBlock, fetchRawBlockResults now accept *rpc.Client instead of constructing per-call. Cleanup: - queryLatestHeight in result_export.go replaced with rpc.NewStatusClient().LatestHeight() — eliminates duplicate /status parsing logic. - queryBlockResults uses a shared rpc.Client instead of per-call. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bdchatham
commented
Apr 3, 2026
- Rename seictl_task_duration_seconds → seictl_task_execution_duration_seconds to clarify this measures handler wall-clock time, not submission latency - Update help text to be explicit about measurement point - go mod tidy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prod hardening: sidecar observability and performance improvements.
Changes
seictl_task_duration_seconds(histogram),seictl_task_submissions_total,seictl_task_failures_total. Exposed at/v0/metricsviapromhttp.Handler().Comparatorholds two*rpc.Clientinstances constructed once inNewComparator, reused across all block/block_results queries. Eliminates per-requesthttp.Clientallocation in the comparison hot loop.queryLatestHeightconsolidated — replaced standalone function inresult_export.gowithrpc.NewStatusClient().LatestHeight(), eliminating duplicate/statusparsing.queryBlockResultspooled — uses a sharedrpc.Clientinstead of constructing per-call.Companion to
Test plan
go test ./sidecar/rpc/— passgo test ./sidecar/engine/— passgo test ./sidecar/shadow/— passgo test ./sidecar/server/— passgo test ./sidecar/tasks/— passgo build ./sidecar/...— clean🤖 Generated with Claude Code