Github Push Events

Compute at what times during a week are there most activities on Github based on push events.

Visualization: The heatmap displays GitHub push activity patterns across a weekly cycle, creating a two-dimensional grid where:

  • X-axis (horizontal) shows days of the week (1-7)

  • Y-axis (vertical) shows hours of the day (0-23)

  • The cell color and intensity shows the total commits: darker color for higher commit activity, lighter color for lower commit activity, white color for no activity.

Each cell in the heat map grid represents a specific day-hour combination:

Heat map widget showing a use case of github push events

Figure 220. Github Push Events


Sample input data:

commitsrepotimestamptypeuser
3myapp2025-08-11T09:15:23ZPushEventdev1
1myapp2025-08-11T14:30:24ZPushEventdev2
2backend2025-08-12T10:45:25ZPushEventdev3
4frontend2025-08-12T16:20:26ZPushEventdev1
1myapp2025-08-13T11:05:27ZPushEventdev4
2backend2025-08-13T15:40:28ZPushEventdev2
3frontend2025-08-14T08:55:29ZPushEventdev3
2myapp2025-08-14T13:10:30ZPushEventdev1
1backend2025-08-15T10:25:31ZPushEventdev4
3frontend2025-08-15T14:50:32ZPushEventdev2

Query:

logscale
type=PushEvent
| dayOfWeek := time:dayOfWeek(@timestamp)
| hourOfDay := time:hour(@timestamp)
| groupBy([dayOfWeek, hourOfDay], function=sum(commits, as=TotalCommits))

Query breakdown:

  1. Filters events to ensure only Git push events are analyzed.

  2. Extracts the day of the week from the @timestamp field using the time:dayOfWeek() function and stores the result in a new field named dayOfWeek.

  3. Extracts the hour of the day (0-23) from the @timestamp field using the time:hour() function and stores the result in a new field named hourOfDay.

  4. Groups events by both dayOfWeek and hourOfDay, creating a two-dimensional aggregation matrix. For each unique combination of day and hour, it sums the total number of commits.

Configuration:

  1. From the Search page, type your query in the Query Editor → click Run

  2. Choose Heat Map in the Widget selector

  3. Click the style icon : this opens the Format panel on the side where some properties are already configured by default based on the query result.

  4. Modify some other widget's properties to obtain the look and feel of this heatmap. For example:

  5. In Layout, tick the Gridlines checkbox to show cell borders.

  6. In X-axis and Y-axis, enter a preferred custom title.

  7. In Colors, change the palette from the default color to magenta.

You can further customize this widget by setting more properties, see Heat Map Property Reference.