Skip to content

geoprobe: telemetry agent extensions — probe measurement and offset delivery #2899

@nikw9944

Description

@nikw9944

RFC Reference: rfc16-geolocation-verification.md — Phase 1, item 1 (Telemetry agent extensions)
Tracking issue: #2893

Goal

Extend the existing telemetry agent to measure RTT to child geoProbes via TWAMP, generate signed Offset structures, and deliver them via UDP.

Scope

  • New CLI flag --additional-child-probes (comma-separated host:port list) on the telemetry agent binary (controlplane/telemetry/cmd/telemetry/main.go)
  • New module controlplane/telemetry/internal/geoprobe/pinger.go: periodic TWAMP measurement to configured probes, reusing existing twamplight.Sender interface from tools/twamp/pkg/light/
  • New module controlplane/telemetry/internal/geoprobe/publisher.go: generates signed Offset (using DZD's metrics_publisher_pk keypair, lat/lng from device config) and sends via UDP to each probe
  • Integration into collector.go: add a new goroutine alongside the existing pinger/submitter goroutines, gated on --additional-child-probes being non-empty
  • Unit tests for the probe pinger and publisher modules

Integration points

  • collector.go (lines ~83-168): Add goroutine for geoprobe measurement loop, similar to existing pinger goroutine pattern
  • cmd/telemetry/main.go: Add CLI flags, pass config to collector
  • Reuses twamplight.NewSender for TWAMP probing (same interface as existing device probing)
  • Reuses existing solana.PrivateKey (loaded from --keypair) for offset signing

Files to change

  • controlplane/telemetry/cmd/telemetry/main.go — new flags, wire up geoprobe config
  • controlplane/telemetry/internal/telemetry/collector.go — new goroutine for probe measurement
  • controlplane/telemetry/internal/telemetry/config.go — new config fields

Files to create

  • controlplane/telemetry/internal/geoprobe/pinger.go
  • controlplane/telemetry/internal/geoprobe/publisher.go
  • controlplane/telemetry/internal/geoprobe/pinger_test.go
  • controlplane/telemetry/internal/geoprobe/publisher_test.go

Estimated scope

Medium (~300–500 lines)

Dependencies

Depends on #2898 (shared geoprobe library).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions