Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metric: Vehicle Postion Validation #41

Open
Hasaber8 opened this issue Feb 14, 2025 · 0 comments
Open

Metric: Vehicle Postion Validation #41

Hasaber8 opened this issue Feb 14, 2025 · 0 comments

Comments

@Hasaber8
Copy link
Contributor

Vehicle Position Validation Metrics

Description

Add metrics to track the validity of vehicle positions from GTFS-RT feeds. This helps transit agencies identify data quality issues in their real-time vehicle position feeds.

Background

The original Java Watchdog included position validation, but the Go version needs to implement this using only public GTFS-RT feeds without requiring internal server access.

Implementation Details

Data Source

  • GTFS-RT Vehicle Positions feed
  • Accessed via: server.VehiclePositionUrl configuration

New Prometheus Metrics

  1. invalid_vehicle_positions_count_gtfs_rt

    • Type: Gauge
    • Labels: gtfs_rt_url, server_id
    • Description: Number of invalid vehicle positions (invalid lat/lon) in the GTFS-RT feed
  2. valid_vehicle_positions_percent_gtfs_rt

    • Type: Gauge
    • Labels: gtfs_rt_url, server_id
    • Description: Percentage of valid vehicle positions in the GTFS-RT feed

Validation Rules

  • Latitude must be between -90 and 90 degrees
  • Longitude must be between -180 and 180 degrees
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant