Skip to content

regeter/fleet-debugger

 
 

Fleet Debugger Tool

A visualization and debugging tool for Google Maps Platform's Mobility Solutions, supporting Scheduled tasks and On-demand trips.

Screenshot

Using the Demo Site(s)

The fastest way to get started is using our GitHub hosted site:
https://googlemaps.github.io/fleet-debugger/demos/multiple-trips

We also have demo data for:

Loading Your Data

Click on any empy Dataset buttons Load Dataset to get the Fleet Engine Logs Loading UI.

Fleet Engine Logs Loading

Direct Cloud Logging Connection (Recommended)

  1. Configure Parameters: Configure the Cloud Logging query parameters directly within UI.

  2. Connect to Cloud Logging: The Fleet Debugger can connect directly to your Google Cloud project's Cloud Logging. Click the Sign in and Fetch Logs button and follow the prompts to authenticate and grant access. You'll need appropriate IAM permissions (roles/logging.viewer which is also granted via roles/viewer) for the Fleet Debugger to read logs.

Log Files in JSON Format

  1. Export your Fleet Engine logs from Cloud Logging using one of the following filters (customize as needed):
-- On-demand trips
resource.type="fleetengine.googleapis.com/Fleet"
AND (labels.vehicle_id="YOUR_VEHICLE_ID" OR
     labels.trip_id=~"(TRIP_ID_1|TRIP_ID_2)")
AND timestamp >= "START_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS)
AND timestamp <= "END_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS)
AND (
    logName:"logs/fleetengine.googleapis.com%2Fcreate_vehicle" OR
    logName:"logs/fleetengine.googleapis.com%2Fupdate_vehicle" OR
    logName:"logs/fleetengine.googleapis.com%2Fcreate_trip" OR
    logName:"logs/fleetengine.googleapis.com%2Fupdate_trip"
)
-- Scheduled tasks
resource.type="fleetengine.googleapis.com/DeliveryFleet"
AND (labels.delivery_vehicle_id="YOUR_VEHICLE_ID" OR
     labels.task_id=~"(TASK_ID_1|TASK_ID_2)")
AND timestamp >= "START_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS)
AND timestamp <= "END_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS)
AND (
    logName:"logs/fleetengine.googleapis.com%2Fcreate_delivery_vehicle" OR
    logName:"logs/fleetengine.googleapis.com%2Fupdate_delivery_vehicle" OR
    logName:"logs/fleetengine.googleapis.com%2Fcreate_task" OR
    logName:"logs/fleetengine.googleapis.com%2Fupdate_task"
)
  1. Download the logs in JSON format and optionally zip them
  2. Import the JSON/ZIP file to Fleet Debugger, using the Load JSON or ZIP file instead button.

Note: All data processing happens client-side. Your logs remain in your browser's Local Storage and are not uploaded to Google/GitHub.

Key Features

  • Filter & inspect log messages: Use customizable table views to easily find and analyze specific log entries.
  • View planned navigation routes: See the routes with traffic conditions as experienced by drivers (requires Restricted Use Logs).
  • Replay vehicle movement: Observe vehicle movement in real time or at an accelerated time-lapse.
  • See requested vs. actual pickup and dropoff points: (requires Restricted Use Logs).
  • View status changes: Track changes in vehicle, trip, and navigation status.
  • Analyze GPS data: Examine location, accuracy, and heading information.
  • Visualize multiple trips: View all trips for a single vehicle.
  • Analyze GPS accuracy, speed, and heading: Detailed analysis tools for these metrics (GPS accuracy, speed, heading).
  • Analyze dwell times: Measure time spent at specific locations (dwell times).
  • Map and Timeslider Interaction: Click directly on the map or the timeslider to select the nearest log event.
  • Tracking (Chevron): Use the tracking button to keep the map centered on the current event during replay.
  • Exporting Logs: Export loaded dataset to a local file for easy collaboration.

Restricted Use Logs

Planned navigation routes and requested Pickup/Dropoff points require enablement of Restricted Use Logs.

Managing Datasets

Each dataset (loaded from a file or Cloud Logging) has a dropdown menu:

  • Save (Export): Save the current dataset as a JSON file.
  • Delete: Remove the dataset from the Fleet Debugger. This clears the data from your browser's local storage.

Restoring Demo Data

To reload the original demo data:

  1. Select "Delete" from Dataset 1 dropdown menu.
  2. Refresh the page. The demo data will be automatically reloaded into Dataset 1.

Running Your Own Server

Development Setup

  1. Install dependencies:

  2. Install node modules:

npm install

Start development server

npm start

Building and Deploying

# Generate static build
npm run build

# Deploy to firebase
npm install -g firebase-tools
firebase deploy --only hosting

Privacy Policy

This project is 100% client-side and does not collect or store any user data on servers. Please see our Privacy Policy for full details.

Disclaimer

This is not an officially supported Google product.

Additional Resources

About

No description, website, or topics provided.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.6%
  • CSS 3.0%
  • Other 1.4%