Skip to content

Commit

Permalink
Repository name
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardsegarra committed Apr 26, 2024
1 parent f15d2c9 commit aeb919a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,16 @@ def monitor_queued_jobs():

for run in details:
app.logger.info(f"DETAIL {run}")
tags = [
"environment:dev",
statsd.histogram(
'midokura.github_runners.jobs.seconds_in_queue.histogram',
run["seconds_in_queue"],
tags=[
f"job:{run['job_name']}",
f"repository:{run['repository']}",
f"runner_name:{run['runner_name']}",
f"run_id:run{run['run_id']}",
f"run_id:run-{run['run_id']}", # "run-" added to group by run-id in DD
f"public:{run['is_public']}"
]
app.logger.info(f"tags {tags}")
statsd.histogram(
'midokura.github_runners.jobs.seconds_in_queue.histogram',
run["seconds_in_queue"],
tags=tags
)

app.logger.info(f"Jobs details {details}")
Expand Down
2 changes: 1 addition & 1 deletion src/job_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def extract_jobs_metrics_from_data(jobs_data: dict, queued_node_ids: dict):
"action": "monitor_queued",
"job_id": job["id"],
"job_name": job["name"],
"repository": job["repository"],
"repository": job["repository"]["name"],
"run_id": queued_node_ids[job["id"]].run_id,
"is_public": queued_node_ids[job["id"]].runner_public,
"runner_name": queued_node_ids[job["id"]].runner_name,
Expand Down

0 comments on commit aeb919a

Please sign in to comment.