diff --git a/tailscalesd/main.py b/tailscalesd/main.py index cac012b..adfb8cb 100644 --- a/tailscalesd/main.py +++ b/tailscalesd/main.py @@ -88,10 +88,12 @@ def tailscale_labels(tailnet, device, tag) -> Dict[str, str]: async def matrix_node_sd(device) -> Dict: + log.info("Polling matrix node", extra={"props": {"hostname": device["hostname"]}}) ipv4 = ipv4_only(device["addresses"])[0] async with httpx.AsyncClient() as client: r = await client.get(f"http://{ipv4}:8081/") data = r.json() + log.debug(f"Found {len(data)} workers", extra={"hostname": device["hostname"]}) return group_by_type(data) @@ -138,6 +140,7 @@ async def matrix_sd(tailnet, devices) -> List: targets = matrix_workers_to_sd(tailnet, device, workers) if targets: sd.append(targets) + log.info(f"Found {len(sd)} matrix servcies") return []