|
1 | 1 | # Fleet Debugger Tool |
2 | 2 |
|
3 | | -A visualization and debugging tool for Google Maps Platform's Mobility Solutions, supporting [Scheduled tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/tasks-intro) and [On-demand trips](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/trip-intro). |
| 3 | +Fleet Debugger is an open-source web tool designed to help you visualize and analyze logs from Google Maps Platform's Mobility solutions, supporting both [Scheduled tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/tasks-intro) and [On-demand trips](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/trip-intro). It provides an interactive map and timeline to analyze vehicle and task or trip data, running entirely in your browser. |
4 | 4 |
|
5 | | - |
| 5 | + |
6 | 6 |
|
7 | | -## Using the Demo Site(s) |
| 7 | +## Key Features |
8 | 8 |
|
9 | | -The fastest way to get started is using our GitHub hosted site: \ |
10 | | -[googlemaps.github.io/fleet-debugger/demos/multiple-trips](https://googlemaps.github.io/fleet-debugger/demos/multiple-trips) |
| 9 | +Fleet Debugger helps you understand complex journey and vehicle behaviors by offering: |
11 | 10 |
|
12 | | -We also have demo data for: |
13 | | -- [Scheduled task](https://googlemaps.github.io/fleet-debugger/demos/lmfs/) |
| 11 | +* **Interactive map and timeline replay:** Observe vehicle movement in real time or at an accelerated time-lapse. |
| 12 | +* **Synchronization:** Events are linked across the map, data table, and timeline. Click an event in one place, and it's highlighted everywhere. |
| 13 | +* **Detailed log entry inspection:** Deep dive into API requests and responses. |
| 14 | +* **Filter & inspect log messages:** Use customizable table views to easily find and analyze specific log entries. |
| 15 | +* **File Import:** Load logs from JSON or ZIP files. |
| 16 | +* **Direct Cloud Logging Connection:** Securely fetch logs directly from your Google Cloud project. |
| 17 | +* **Flexible Filtering:** Easily narrow down data by time range, entity IDs, and more. |
| 18 | +* **View status changes:** Track changes in vehicle, trip, task, and navigation status. |
| 19 | +* **Visualize multiple trips:** View all trips or tasks for a single vehicle. |
| 20 | +* **Analyze GPS data:** Examine location, accuracy, and heading information. |
| 21 | + * **GPS accuracy, speed, and heading analysis:** Detailed analysis tools for these metrics ([GPS accuracy](docs/GPSAccuracy.md), [speed](docs/Speed.md), [heading](docs/Heading.md)). |
| 22 | +* **Analyze dwell times:** Measure time spent at specific locations ([dwell times](docs/DwellTimes.md)). |
| 23 | +* **View planned navigation routes:** See the routes with traffic conditions as experienced by drivers (requires [Restricted Use Logs](#restricted-use-logs)). |
| 24 | +* **See requested vs. actual pickup and dropoff points:** (requires [Restricted Use Logs](#restricted-use-logs)). |
| 25 | +* **Map and Timeslider Interaction:** Click directly on the map or the timeslider to select the nearest log event. |
| 26 | +* **Tracking (Chevron):** Use the tracking button to keep the map centered on the current event during replay. |
| 27 | +* **Exporting Logs:** Export loaded dataset to a local file for easy collaboration. |
14 | 28 |
|
15 | | -### Loading Your Data |
| 29 | +## Using the Demo Site |
16 | 30 |
|
17 | | -Click on any empy Dataset buttons `Load Dataset` to get the `Fleet Engine Logs Loading` UI. |
| 31 | +The fastest way to get started is using our GitHub hosted site. |
18 | 32 |
|
19 | | - |
| 33 | +This site includes demo data for: |
20 | 34 |
|
21 | | -#### Direct Cloud Logging Connection (Recommended) |
| 35 | +* [On-demand trips](https://googlemaps.github.io/fleet-debugger/demos/multiple-trips) |
| 36 | +* [Scheduled tasks](https://googlemaps.github.io/fleet-debugger/demos/lmfs/) |
22 | 37 |
|
23 | | -1. **Configure Parameters:** Configure the Cloud Logging query parameters directly within UI. |
| 38 | +## Loading Your Data |
24 | 39 |
|
25 | | -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. |
| 40 | +Click on any empty "Load Dataset" button to open the data loading interface. |
26 | 41 |
|
27 | | -#### Log Files in JSON Format |
| 42 | + |
28 | 43 |
|
29 | | -1. Export your Fleet Engine logs from Cloud Logging using one of the following filters (customize as needed): |
| 44 | +### 1. Direct Cloud Logging Connection (Recommended) |
30 | 45 |
|
31 | | -```sql |
32 | | --- On-demand trips |
33 | | -resource.type="fleetengine.googleapis.com/Fleet" |
34 | | -AND (labels.vehicle_id="YOUR_VEHICLE_ID" OR |
35 | | - labels.trip_id=~"(TRIP_ID_1|TRIP_ID_2)") |
36 | | -AND timestamp >= "START_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS) |
37 | | -AND timestamp <= "END_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS) |
38 | | -AND ( |
39 | | - logName:"logs/fleetengine.googleapis.com%2Fcreate_vehicle" OR |
40 | | - logName:"logs/fleetengine.googleapis.com%2Fupdate_vehicle" OR |
41 | | - logName:"logs/fleetengine.googleapis.com%2Fcreate_trip" OR |
42 | | - logName:"logs/fleetengine.googleapis.com%2Fupdate_trip" |
43 | | -) |
44 | | -``` |
| 46 | +1. **Configure Parameters:** Input your Project ID, Vehicle ID(s) or Trip/Task ID(s), and the selected time range within the UI. |
| 47 | +2. **Connect to Cloud Logging:** Click the "Sign in and Fetch Logs" button and follow the prompts to authenticate with your Google Account and grant access. You'll need appropriate IAM permissions (e.g., `roles/logging.viewer`) to read logs. |
45 | 48 |
|
46 | | -```sql |
47 | | --- Scheduled tasks |
48 | | -resource.type="fleetengine.googleapis.com/DeliveryFleet" |
49 | | -AND (labels.delivery_vehicle_id="YOUR_VEHICLE_ID" OR |
50 | | - labels.task_id=~"(TASK_ID_1|TASK_ID_2)") |
51 | | -AND timestamp >= "START_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS) |
52 | | -AND timestamp <= "END_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS) |
53 | | -AND ( |
54 | | - logName:"logs/fleetengine.googleapis.com%2Fcreate_delivery_vehicle" OR |
55 | | - logName:"logs/fleetengine.googleapis.com%2Fupdate_delivery_vehicle" OR |
56 | | - logName:"logs/fleetengine.googleapis.com%2Fcreate_task" OR |
57 | | - logName:"logs/fleetengine.googleapis.com%2Fupdate_task" |
58 | | -) |
59 | | -``` |
| 49 | +### 2. Import from Log Files |
60 | 50 |
|
61 | | -2. Download the logs in JSON format and optionally zip them |
62 | | -3. Import the JSON/ZIP file to Fleet Debugger, using the `Load JSON or ZIP file instead` button. |
| 51 | +You can load log data from JSON or ZIP files using the "Load JSON or ZIP file instead" button. This is useful for: |
63 | 52 |
|
64 | | -> **Note**: All data processing happens client-side. Your logs remain in your browser's Local Storage and are not uploaded to Google/GitHub. |
| 53 | +* Analyzing logs shared with you. |
| 54 | +* Loading previously exported datasets. |
65 | 55 |
|
66 | | -### Key Features |
| 56 | +You can export logs from the Google Cloud Console's Logs Explorer. |
67 | 57 |
|
68 | | -- **Filter & inspect log messages:** Use customizable table views to easily find and analyze specific log entries. |
69 | | -- **View planned navigation routes:** See the routes with traffic conditions as experienced by drivers (requires [Restricted Use Logs](#restricted-use-logs)). |
70 | | -- **Replay vehicle movement:** Observe vehicle movement in real time or at an accelerated time-lapse. |
71 | | -- **See requested vs. actual pickup and dropoff points:** (requires [Restricted Use Logs](#restricted-use-logs)). |
72 | | -- **View status changes:** Track changes in vehicle, trip, and navigation status. |
73 | | -- **Analyze GPS data:** Examine location, accuracy, and heading information. |
74 | | -- **Visualize multiple trips:** View all trips for a single vehicle. |
75 | | -- **Analyze GPS accuracy, speed, and heading:** Detailed analysis tools for these metrics ([GPS accuracy](docs/GPSAccuracy.md), [speed](docs/Speed.md), [heading](docs/Heading.md)). |
76 | | -- **Analyze dwell times:** Measure time spent at specific locations ([dwell times](docs/DwellTimes.md)). |
77 | | -- **Map and Timeslider Interaction:** Click directly on the map or the timeslider to select the nearest log event. |
78 | | -- **Tracking (Chevron):** Use the tracking button to keep the map centered on the current event during replay. |
79 | | -- **Exporting Logs:** Export loaded dataset to a local file for easy collaboration. |
| 58 | +> **Note**: All data processing happens client-side. Your logs or API keys are not uploaded to any server. Data is stored in your browser's Local Storage. |
80 | 59 |
|
81 | | -### Restricted Use Logs |
| 60 | +## Restricted Use Logs |
82 | 61 |
|
83 | | -Planned navigation routes and requested Pickup/Dropoff points require enablement of [Restricted Use Logs](https://developers.google.com/maps/documentation/mobility/operations/cloud-logging/setup#enable_restricted_use_logs). |
| 62 | +To see features like the driver's planned navigation route, traffic, and original requested stop locations, you need to enable |
| 63 | +[Restricted Use Logs](https://developers.google.com/maps/documentation/mobility/operations/cloud-logging/setup#enable_restricted_use_logs) in your Google Cloud project. This is not required for the tool to function but highly recommended for a richer analysis. |
84 | 64 |
|
85 | | -### Managing Datasets |
| 65 | +## Managing Datasets |
86 | 66 |
|
87 | | -Each dataset (loaded from a file or Cloud Logging) has a dropdown menu: |
| 67 | +Each dataset has a dropdown menu: |
88 | 68 |
|
89 | | -- **Save (Export):** Save the current dataset as a JSON file. |
90 | | -- **Delete:** Remove the dataset from the Fleet Debugger. This clears the data from your browser's local storage. |
| 69 | +- **Export:** Save the current dataset as a JSON file to your local system. |
| 70 | +- **Delete:** Remove the dataset from the Fleet Debugger and your browser's local storage. |
91 | 71 |
|
92 | 72 | ### Restoring Demo Data |
93 | 73 |
|
94 | 74 | To reload the original demo data: |
95 | | -1. Select "Delete" from `Dataset 1` dropdown menu. |
96 | | -2. Refresh the page. The demo data will be automatically reloaded into Dataset 1. |
| 75 | +1. Select "Delete" from the `Dataset 1` dropdown menu. |
| 76 | +2. Refresh the page. The demo data will be automatically reloaded. |
97 | 77 |
|
98 | 78 | ## Running Your Own Server |
99 | 79 |
|
100 | 80 | ### Development Setup |
101 | 81 |
|
102 | | -1. Install dependencies: |
103 | | - - [Node.js](https://nodejs.org/en/download) |
104 | | - |
105 | | -2. Install node modules: |
106 | | -```bash |
107 | | -npm install |
108 | | -``` |
| 82 | +1. Install dependencies: |
| 83 | + * [Node.js](https://nodejs.org/en/download) |
| 84 | +2. Clone the repository: |
| 85 | + ```bash |
| 86 | + git clone https://github.com/googlemaps/fleet-debugger.git |
| 87 | + cd fleet-debugger |
| 88 | + ``` |
| 89 | +3. Install node modules: |
| 90 | + ```bash |
| 91 | + npm install |
| 92 | + ``` |
| 93 | +4. Add Maps Javascript API Key to src/constants.js |
109 | 94 |
|
110 | 95 | ### Start development server |
111 | 96 |
|
112 | 97 | ```bash |
113 | 98 | npm start |
114 | 99 | ``` |
| 100 | +This will open the app in your default browser, usually at `http://localhost:3000`. |
115 | 101 |
|
116 | 102 | ### Building and Deploying |
117 | 103 |
|
118 | 104 | ```bash |
119 | 105 | # Generate static build |
120 | 106 | npm run build |
| 107 | +``` |
| 108 | +The static files will be in the `build` folder. You can deploy this folder to any static site hosting service. For Firebase Hosting: |
121 | 109 |
|
122 | | -# Deploy to firebase |
| 110 | +```bash |
| 111 | +# Optional: Install Firebase CLI globally |
123 | 112 | npm install -g firebase-tools |
| 113 | +
|
| 114 | +# Deploy to Firebase Hosting |
124 | 115 | firebase deploy --only hosting |
125 | 116 | ``` |
| 117 | +(Requires Firebase project setup and `firebase login`) |
126 | 118 |
|
127 | | -## Privacy Policy |
128 | | - |
129 | | -This project is 100% client-side and does not collect or store any user data on servers. Please see our [Privacy Policy](docs/PRIVACY.md) for full details. |
| 119 | +## Privacy |
130 | 120 |
|
131 | | -## Disclaimer |
| 121 | +This project is 100% client-side. Please see our [Privacy Policy](docs/PRIVACY.md) for full details. |
132 | 122 |
|
133 | | -This is not an officially supported Google product. |
| 123 | +## Support & Contributing |
134 | 124 |
|
135 | | -## Additional Resources |
| 125 | +This Fleet Debugger tool is offered under an open source license. It is not an officially supported Google product. |
136 | 126 |
|
137 | | -- [Reporting Issues](docs/reporting-issues.md) |
| 127 | +* To report bugs or request features, file an issue on |
| 128 | + [GitHub](https://github.com/googlemaps/fleet-debugger/issues). |
| 129 | +* For technical questions and discussions, use the |
| 130 | + [Google Maps Platform developer community channels](https://developers.google.com/maps/developer-community). |
| 131 | +* To contribute, check the [CONTRIBUTING.md](CONTRIBUTING.md) guide. |
0 commit comments