Skip to content

Implement agent time sync with backend#25

Merged
sagostin merged 6 commits into
masterfrom
time-sync-agent
May 13, 2026
Merged

Implement agent time sync with backend#25
sagostin merged 6 commits into
masterfrom
time-sync-agent

Conversation

@sagostin

Copy link
Copy Markdown
Member

Summary

  • Agent now syncs time with backend server at startup and periodically
  • Calculates clock offset to normalize timestamps across distributed measurements

Technical Details

  • Added time sync client in web/client.go
  • Probes now use synchronized timestamps (probes/dns.go, workers/probes.go)
  • Worker data includes offset correction (workers/data.go)
  • Main.go orchestrates periodic sync

Use Case

Ensures all agents report consistent timestamps regardless of local clock drift or network latency, critical for accurate latency measurement correlation.

Fullstack Agent and others added 6 commits May 13, 2026 19:41
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
- Rename agent/time/ directory to agent/nettime/
- Change package declaration from 'time' to 'nettime' in time_sync.go
- Update all imports to use 'nettime "github.com/netwatcherio/netwatcher-agent/nettime"'
- Change time.AdjustedTime() calls to nettime.AdjustedTime()
- Remove alias needed - nettime package used directly without alias

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
@sagostin
sagostin merged commit 82eea72 into master May 13, 2026
2 checks passed
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