Skip to content

beholder: apply 1s MetricReaderInterval default when config field is zero#2230

Draft
pkcll wants to merge 1 commit into
mainfrom
beholder-metric-reader-interval-default
Draft

beholder: apply 1s MetricReaderInterval default when config field is zero#2230
pkcll wants to merge 1 commit into
mainfrom
beholder-metric-reader-interval-default

Conversation

@pkcll

@pkcll pkcll commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add metricReaderInterval() so partial beholder.Config literals get Beholder's 1s default instead of OTel's 60s fallback when MetricReaderInterval is zero
  • Use the effective interval in gRPC + HTTP PeriodicReader and in the beholder.config.info gauge attribute
  • Add unit test for zero → 1s and explicit override
  • No caller changes required (chainlink/core/cmd/shell.go, pkg/loop/server.go)

Test plan

  • go test ./pkg/beholder/...
  • Verify beholder.config.info{metric_reader_interval="1s"} on a node using partial config literals after deploy

Made with Cursor

…zero

Partial beholder.Config literals left MetricReaderInterval at zero, which
OTel interpreted as its own 60s default instead of Beholder's intended 1s.
Centralize effective defaulting inside beholder and record the resolved
interval in the config gauge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant