-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Implement ow-exporter for Overwatch 2 Profile Statistics
Overview
Create a new Overwatch 2 statistics exporter that scrapes player profiles and exposes metrics via Prometheus. This replaces the old OW1 exporter that was removed.
Analysis Completed ✅
- Downloaded and analyzed two sample profiles
- Identified platform separation (PC/Console)
- Found game mode separation (Quick Play/Competitive)
- Mapped 15 core metrics with CSS selectors
- Confirmed HTML parsing approach (no headless browser needed)
Technical Requirements
Architecture
cmd/ow-exporter/
├── main.go # HTTP server + CLI
├── api/ # REST API for user management
├── scraper/ # HTML parsing and HTTP client
├── storage/ # SQLite for users, memory cache for stats
├── metrics/ # Prometheus exporter
├── models/ # Data structures
└── config/ # Configuration
Features
- Platform support (PC/Console)
- Game mode support (Quick Play/Competitive)
- 15 hardcoded metrics (time played, win rate, etc.)
- REST API for user management
- SQLite storage for persistence
- Prometheus metrics export
- Background scheduler (5min intervals)
- Rate limiting and error handling
Prometheus Labels
ow_hero_time_played_seconds{
username="player1",
hero="mercy",
platform="pc", # "pc" | "console"
gamemode="competitive" # "quickplay" | "competitive"
}
API Endpoints
GET /api/users- list usersPOST /api/users- add user (username + profile_id)PUT /api/users/{username}- update userDELETE /api/users/{username}- remove userGET /metrics- Prometheus metricsGET /health- health check
Implementation Plan
- Create basic project structure
- Implement HTML parser with platform support
- Add SQLite storage for user management
- Create REST API endpoints
- Implement Prometheus metrics exporter
- Add background scheduler
- Add error handling and rate limiting
- Update container build configuration
- Add documentation and examples
Success Criteria
- Can add users via REST API
- Automatically scrapes profiles every 5 minutes
- Exports Prometheus metrics with platform/gamemode labels
- Handles both PC and Console statistics
- Supports Quick Play and Competitive modes
- Works with current Overwatch 2 profile URLs
Test Profile URLs
https://overwatch.blizzard.com/en-us/career/de5bb4aca17492e0bba120a1d1%7Ca92a11ef8d304356fccfff8df12e1dc6/https://overwatch.blizzard.com/en-us/career/c14aad9eba729abefdf565bdd606a600%7C20e30637fb9054272d5bf9529de8bc70/
This issue will track the complete implementation of the new ow-exporter.
Metadata
Metadata
Assignees
Labels
No labels