Skip to content

feat(node): warn when Prometheus remote write is not configured - #5037

Open
jmgilman wants to merge 8 commits into
wormhole-foundation:mainfrom
jmgilman:jmgilman/telemetry-metrics-warning
Open

jmgilman wants to merge 8 commits into
wormhole-foundation:mainfrom
jmgilman:jmgilman/telemetry-metrics-warning

Conversation

@jmgilman

@jmgilman jmgilman commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Stacked on #5036: the first two commits are that PR, so review only the last one (node: warn when Prometheus remote write is not configured). I'll rebase onto main once #5036 merges.

On mainnet and testnet, guardiand refuses to start without --telemetryLokiURL unless --disableTelemetry is set. Metrics have no such default: --promRemoteURL is optional, and --disableTelemetry doesn't affect it. We want Guardians to send both, with one switch to opt out of both.

This PR announces the change without changing behavior. Outside devnet, at startup:

  • no --promRemoteURL and no --disableTelemetry → warn that a future release will require --promRemoteURL;
  • --disableTelemetry while --promRemoteURL is set → warn that metrics are still pushed, and that a future release will stop pushing them when --disableTelemetry is set.

operations.md describes both the current and the planned behavior.

A follow-up release will turn the first warning into the same startup error Loki has and make --disableTelemetry disable metrics too. It will land once operators have their metrics URLs.

A non-2xx response from the remote write endpoint was logged and then
reported as success, so an invalid token or rejected batch looked healthy
to the caller. Return an error carrying the status and the start of the
response body for any non-2xx response.
The push interval was fixed at 15 seconds. Hosted receivers bill by
samples per minute as well as active series, so a fixed 15 s interval
costs four times what a 1 minute interval does for the same series.
Default stays 15 s; non-positive values are rejected at startup.

Also document --promRemoteURL in operations.md, and correct the
statement that Loki telemetry is optional on mainnet.
SafeRead caps reads at MaxSafeInputSize (128MB). The remote write error
path wrapped it in an io.LimitReader to keep the logged body small.
SafeReadN takes the limit as an argument (1..MaxSafeInputSize) and
SafeRead now delegates to it, so existing callers are unchanged.

A rejected remote write with a body over 512 bytes now reports the status
without the body instead of the first 512 bytes.
@jmgilman
jmgilman force-pushed the jmgilman/telemetry-metrics-warning branch from 5b8e99d to b90cea5 Compare October 8, 2026 16:19
Each push gathers and sends the whole metrics registry, so a very short
interval loads both the node and the receiver. The flag exists to push
less often; make the 15s default also the minimum.
Logs are already required on mainnet and testnet unless --disableTelemetry
is set; metrics are not. Warn at startup outside devnet when
--promRemoteURL is missing, and when --disableTelemetry is set while
metrics are still pushed, ahead of a release that requires metrics and
makes --disableTelemetry cover both. Behavior is otherwise unchanged.
@jmgilman
jmgilman force-pushed the jmgilman/telemetry-metrics-warning branch from b90cea5 to bb85c61 Compare October 13, 2026 15:04

This branch has not been deployed

No deployments
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