Skip to content

Feature: Observability and metrics #8

@LBC970

Description

@LBC970

Description

Add visibility into bot health and participation trends.

Features

1. Metrics/stats dashboard

Track participation trends over time:

  • Signup counts per week
  • Pairing completion rates
  • Badge progression stats
  • Most/least paired individuals

Could be a /coffee-admin stats command or a weekly summary.

2. Slack notifications for errors

Alert admins when something fails:

  • Failed pairing runs
  • S3 read/write errors
  • Slack API failures
  • Missing environment variables

Options:

  • DM the admin user(s)
  • Post to a dedicated #coffee-bot-alerts channel
  • Or just improve CloudWatch logging/alarms

3. Structured logging

Currently uses print statements. Consider:

  • JSON-formatted logs for easier CloudWatch parsing
  • Log levels (INFO, WARNING, ERROR)
  • Request tracing (correlation IDs)

Example Stats Output

Coffee Bot Stats (Last 30 Days)

Participation:
- Average signups per week: 12
- Total unique participants: 24
- Most active: Alice (8 weeks), Bob (7 weeks)

Pairings:
- Total pairings made: 42
- Singles: 6

Badge Distribution:
🏆 Coffee Legend: 2
🏅 Coffee Veteran: 4
⭐ Coffee Enthusiast: 6
🥈 Regular: 8
🥉 Coffee Newbie: 3
☕ First Timer: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions