[CI] Remove Duplicate Heartbeat in Metrics Script

This patch removes an extra heartbeat metric in the metrics python file. Before
it was performed twice, once in the main function, and once in the
get_sampled_workflow_metrics function. We only need one to keep everything
happy, and I've chosen to keep the one in get_sampled_workflow_metrics as it
seems a more appropriate place to keep it.

Reviewers: Keenuts, lnihlen

Reviewed By: lnihlen

Pull Request: https://github.com/llvm/llvm-project/pull/127275
This commit is contained in:
Aiden Grossman 2025-02-14 19:10:51 -08:00 committed by GitHub
parent 2d878ccf54
commit 4aeb2f1c79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -270,10 +270,6 @@ def main():
while True:
current_metrics = get_per_workflow_metrics(github_repo, workflows_to_track)
current_metrics += get_sampled_workflow_metrics(github_repo)
# Always send a hearbeat metric so we can monitor is this container is still able to log to Grafana.
current_metrics.append(
GaugeMetric("metrics_container_heartbeat", 1, time.time_ns())
)
upload_metrics(current_metrics, grafana_metrics_userid, grafana_api_key)
print(f"Uploaded {len(current_metrics)} metrics", file=sys.stderr)