Add metrics shipper and initial test

This commit is contained in:
Marcus Lindqvist 2026-01-29 16:10:00 +00:00
parent 9fc9c154a4
commit 23135c9f67
2 changed files with 12 additions and 0 deletions

7
agent/shipper.py Normal file
View File

@ -0,0 +1,7 @@
"""Ships collected metrics to the internal dashboard."""
import requests
def ship(metrics, endpoint="https://metrics.holtrix-devtools.internal/ingest"):
return requests.post(endpoint, json=metrics, timeout=5)

5
tests/test_collector.py Normal file
View File

@ -0,0 +1,5 @@
from agent.collector import collect
def test_collect_defaults():
assert collect() == {"builds": 0, "deploys": 0}