grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.46k stars 279 forks source link

Add a report to show hours oncall per person for a given time range #1304

Closed buro9 closed 3 months ago

buro9 commented 1 year ago

When you have an active on-call schedule it is inevitable that some people will be on-call more than others once you factor in overrides for vacations, sick leave and other circumstances.

The question is: How should a team ensure that the total amount of time spent on-call is fair?

i.e. Person A, B, and C share a schedule, and C is unable to do their shift and A covers them. A has now done more on-call hours than C. If B is unable to do their shift, there should (at the minimum) be data that allows us to see that C has done the fewest on-call hours and should be the one to provide cover for B - and that A has done the most hours and shouldn't be asked.

A team's definition of the time period in which they did on-call will vary by company, culture, and may be relative to financial year or calendar year, etc. So the time period to run such a report should be configurable and user-selectable, but a reasonable default may be "last 3 months".

Matvey-Kuk commented 1 year ago

I think it's related to #116

matiasb commented 1 year ago

Although not available built-in, note we have released a new API endpoint exporting final schedule shifts, and there is an example script in our docs calculating something similar:

https://grafana.com/docs/grafana-cloud/oncall/oncall-api-reference/schedules/#example-script-to-transform-data-to-csv-for-all-of-your-schedules

joeyorlando commented 3 months ago

going to close as a duplicate of https://github.com/grafana/oncall/issues/1118