DF-21989: OCR2 on-chain view gauges (median relay)#21684
Draft
cl-efornaciari wants to merge 2 commits intosmartcontractkit:developfrom
Draft
DF-21989: OCR2 on-chain view gauges (median relay)#21684cl-efornaciari wants to merge 2 commits intosmartcontractkit:developfrom
cl-efornaciari wants to merge 2 commits intosmartcontractkit:developfrom
Conversation
cll-gg
reviewed
Mar 25, 2026
Comment on lines
+13
to
+30
| var ( | ||
| promOCR2OnchainLatestAnswer = promauto.NewGaugeVec(prometheus.GaugeOpts{ | ||
| Name: "ocr2_onchain_transmission_latest_answer", | ||
| Help: "Latest median answer from the node's on-chain read of LatestTransmissionDetails (OCR2 aggregator). Float64 may not represent full int256 precision.", | ||
| }, []string{"chain_id", "contract_address", "transmitter_id"}) | ||
| promOCR2OnchainLatestTimestampUnix = promauto.NewGaugeVec(prometheus.GaugeOpts{ | ||
| Name: "ocr2_onchain_transmission_latest_timestamp_unix", | ||
| Help: "Unix seconds of latest on-chain transmission timestamp from the node's LatestTransmissionDetails read.", | ||
| }, []string{"chain_id", "contract_address", "transmitter_id"}) | ||
| promOCR2OnchainEpoch = promauto.NewGaugeVec(prometheus.GaugeOpts{ | ||
| Name: "ocr2_onchain_transmission_epoch", | ||
| Help: "Epoch from the node's on-chain LatestTransmissionDetails read.", | ||
| }, []string{"chain_id", "contract_address", "transmitter_id"}) | ||
| promOCR2OnchainRound = promauto.NewGaugeVec(prometheus.GaugeOpts{ | ||
| Name: "ocr2_onchain_transmission_round", | ||
| Help: "Round from the node's on-chain LatestTransmissionDetails read.", | ||
| }, []string{"chain_id", "contract_address", "transmitter_id"}) | ||
| ) |
Emit the same series as Prometheus through beholder.GetMeter() with matching attribute keys (DF-21989).
de81e64 to
af1cd71
Compare
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
Adds Prometheus gauges from
LatestTransmissionDetailsfor EVM median OCR2 jobs (DF-21989, PMAI DF-22676).Metrics
ocr2_onchain_transmission_latest_answerocr2_onchain_transmission_latest_timestamp_unixocr2_onchain_transmission_epochocr2_onchain_transmission_roundLabels:
chain_id,contract_address,transmitter_id(from plugin args).Related
Pairs with chainlink-evm PR for transmit outcome metrics.
Made with Cursor