Skip to content

Fix ping --metric docs to name=value format - #55

Open
aflanagan wants to merge 1 commit into
masterfrom
agent/fix-ping-metric-docs-b585
Open

aflanagan wants to merge 1 commit into
masterfrom
agent/fix-ping-metric-docs-b585

Conversation

@aflanagan

Copy link
Copy Markdown
Contributor

Problem

cronitor ping --metric help and examples documented a type:name=value shape (count:processed=100). That is not what the CLI implements.

parseMetrics in cmd/ping.go treats each pair as name=value (key = everything before =, integer value). sendPing then encodes Telemetry as metric=name:value. Following the old examples would send a bad metric name such as count:processed.

Change

Docs/help/examples only — parser behavior is unchanged.

  • --metric flag help: comma-separated name=value (e.g. queue_depth=42,count=100)
  • Long help: built-in names (count, error_count) plus custom names (queue_depth)
  • Example: --metric "queue_depth=42,count=100"
  • Parser comments updated to match the real format

Searched README and other CLI docs; the incorrect type:name=value shape existed only in cmd/ping.go.

Out of scope

Parser/code changes, Java/other SDKs, merging.

Open in Web Open in Cursor 

Help and examples previously showed type:name=value (e.g.
count:processed=100), which parseMetrics treats as a literal metric
name. Document the actual comma-separated name=value input, including
custom metrics like queue_depth alongside built-ins.

Co-authored-by: August Flanagan <aflanagan@users.noreply.github.com>
@aflanagan
aflanagan marked this pull request as ready for review September 11, 2026 20:28
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.

2 participants