Skip to content

geolocation: add distance conversion to geoprobe-target-sender and fix pubkey logging in geoprobe-agent#3409

Merged
ben-dz merged 1 commit intomainfrom
bdz/geoprobe-logging-fixups
Mar 31, 2026
Merged

geolocation: add distance conversion to geoprobe-target-sender and fix pubkey logging in geoprobe-agent#3409
ben-dz merged 1 commit intomainfrom
bdz/geoprobe-logging-fixups

Conversation

@ben-dz
Copy link
Copy Markdown
Contributor

@ben-dz ben-dz commented Mar 30, 2026

Resolves: #3403

Summary of Changes

  • Add RTT-to-distance conversion in geoprobe-target-sender output (text and JSON), matching geoprobe-target's existing Max Distance display
  • Fix geoprobe-agent log statements to call .String() on pubkeys so they render as base58 instead of byte arrays

Diff Breakdown

Category Files Lines (+/-) Net
Core logic 2 +50 / -19 +31

All changes are core logic across two binaries.

Key files (click to expand)
  • controlplane/telemetry/cmd/geoprobe-target-sender/main.go — add speed-of-light constants, calculateMaxDistance function, max_distance_miles/max_distance_km fields to JSON structs, and Max Distance line to text output
  • controlplane/telemetry/cmd/geoprobe-agent/main.go — append .String() to 5 pubkey log values so they serialize as base58

Testing Verification

  • go test ./controlplane/telemetry/cmd/geoprobe-target-sender/... passes
  • golangci-lint run clean on both packages
  • Distance formula and constants match the existing implementation in geoprobe-target

@ben-dz ben-dz added this to the Geo Location milestone Mar 30, 2026
@ben-dz ben-dz requested a review from nikw9944 March 30, 2026 22:22
@ben-dz ben-dz enabled auto-merge (squash) March 30, 2026 22:22
@ben-dz ben-dz merged commit d53e9da into main Mar 31, 2026
34 checks passed
@ben-dz ben-dz deleted the bdz/geoprobe-logging-fixups branch March 31, 2026 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Geolocation: Add Distance Conversion to Geoprobe-target-sender

2 participants