New Slack Integration: Include Build Duration in Slack Notifications
M
Mark Gaensicke
Summary
Add build duration (elapsed time) as a data field in CircleCI Slack notifications.
Current behavior
Slack notifications currently include the commit ID and link, but do not include how long the build took to complete.
Desired behavior
Include the build duration in Slack notifications, formatted as human-readable elapsed time (e.g., "2 min 34 sec").
Why this matters
Build time is a critical signal for engineering teams — it helps identify regressions in CI performance, gives developers an at-a-glance sense of pipeline health, and reduces the need to click through to the CircleCI UI for routine checks.
Currently, this functionality is not supported in the new CircleCI Slack integration at all. Users who need build time in notifications must instead fall back to the CircleCI Slack Orb and implement complex workarounds in their config: manually capturing a start timestamp, computing elapsed time via shell arithmetic, and injecting it into a custom Slack orb notification. This adds significant boilerplate across every repo and is brittle to maintain.
Proposed implementation
Expose build/workflow duration as an available variable or field in Slack notification payloads, so it can be included natively without custom config. Ideally, this would work for both success and failure notifications.
User impact
Build duration is a commonly requested data point for teams that rely on Slack notifications to monitor CI pipeline health without having to navigate to the CircleCI UI.