← Back to examples
🪵 Server Access Log Analysis
Scenario: An on-call engineer wants to know how many 5xx errors hit the API per hour during the last incident, broken down by status code class.
Skills: column transforms via Series.map, groupby, pivot, error rates.
1 · Parse and bucket access logs
Each row is one HTTP request. Extract the hour and the status class (2xx/4xx/5xx).
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent
2 · Error rate per hour & alert threshold
Compute the 5xx error percentage per hour and flag any hour above 30%.
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent