Skip to content

agent: log config size in bytes and expose size metrics#3743

Merged
nikw9944 merged 1 commit into
mainfrom
nikw9944/doublezero-3741
May 22, 2026
Merged

agent: log config size in bytes and expose size metrics#3743
nikw9944 merged 1 commit into
mainfrom
nikw9944/doublezero-3741

Conversation

@nikw9944
Copy link
Copy Markdown
Contributor

Summary of Changes

  • Add a sibling log line in EAPIClient.startConfigSession reporting the received config payload size in bytes, alongside the existing line-count log. Operators asked for byte-size visibility on every config push.
  • Expose two new Prometheus gauges on the agent — doublezero_agent_config_size_in_bytes and doublezero_agent_config_size_in_lines — set from pollControllerAndConfigureDevice after each successful pull from the controller. Gauges (not counters) because the size of the most-recently-received config can move up or down between polls.
  • Empty controller responses set both gauges to 0, so an empty-poll signal is consistent across both metrics.
  • Fixes config agent: log config size in bytes  #3741

Testing Verification

  • go build ./controlplane/agent/... succeeds on the merged branch.
  • go test ./controlplane/agent/... passes (internal/agent and pkg/arista).
  • gofmt -l controlplane/agent/ is clean.
  • Diff is +22 / -0 lines, no test or behavior regressions touched.

@nikw9944 nikw9944 marked this pull request as ready for review May 21, 2026 20:10
@nikw9944 nikw9944 requested a review from elitegreg May 21, 2026 20:46
Adds a sibling log line in the Arista eapi config-session start
reporting the received config payload size in bytes, alongside the
existing line-count log. Also exposes two new Prometheus gauges set
from pollControllerAndConfigureDevice after each successful pull from
the controller:

  - doublezero_agent_config_size_in_lines
  - doublezero_agent_config_size_in_bytes

Gauges (not counters) since size of the most-recently-received config
can move up or down between polls. Empty controller responses set both
gauges to 0.

Refs #3741
@nikw9944 nikw9944 force-pushed the nikw9944/doublezero-3741 branch from 76cadcf to 30c7bb0 Compare May 22, 2026 14:01
@nikw9944 nikw9944 enabled auto-merge (squash) May 22, 2026 14:02
@nikw9944 nikw9944 merged commit c76cf44 into main May 22, 2026
33 checks passed
@nikw9944 nikw9944 deleted the nikw9944/doublezero-3741 branch May 22, 2026 14:17
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.

config agent: log config size in bytes

2 participants