oncall icon indicating copy to clipboard operation
oncall copied to clipboard

Add metrics generation for on-call schedule

Open shurkys opened this issue 11 months ago • 4 comments

What this PR does

This PR adds functionality to generate metrics for on-call schedules. It introduces a method _get_schedule that retrieves on-call schedules for specified organization IDs, iterates through each schedule, and collects metrics for each user and team combination in the schedule. This enhancement improves the monitoring and analysis capabilities of the application by providing insights into the on-call rotation and team responsibilities.

Output example: oncall_schedule{schedule="Schedule1",team="test_team1",user="oncall"} 1.0

Which issue(s) this PR fixes

Closes https://github.com/grafana/oncall/issues/3427

Checklist

  • [ ] Unit, integration, and e2e (if applicable) tests updated
  • [ ] Documentation added (or pr:no public docs PR label added if not required)

shurkys avatar Mar 05 '24 22:03 shurkys