AI-generated Key Takeaways
-
The Logs Explorer in the Google Cloud console allows you to retrieve, view, and analyze Fleet Engine log entries to gain insights into your operations.
-
You can use the Logs Explorer to inspect specific log entries by building queries with filters such as vehicle ID, trip ID, time period, and error types.
-
Example queries are provided to assist you in searching for different log entries, including how to view all Fleet Engine logs or filter logs for specific criteria.
-
For a deeper dive into query construction and advanced options, refer to the Logging query language and Cloud documentation resources linked in the content.
The Logs Explorer is a tool in the Google Google Cloud console that you can use to retrieve, view, and analyze stored log entries. Use the Logs Explorer to inspect Fleet Engine logs and write queries against those logs.
To access the Logs Explorer from the Google Cloud console:
- Open the Google Cloud console.
- In the Search box at the top, enter Logs Explorer.
- Select Logs Explorer to open it.
For an overview on how to use the Logs Explorer, see View logs by using the Logs Explorer.
Example queries for Log Explorer
The following example queries show how you can search for different log entries in the Logs Explorer. For more information on how to build queries see Logging query language.
View all Fleet Engine logs
type.googleapis.com/maps.fleetengine
View all RPCs to Fleet Engine that returned an error
resource.type:"fleetengine.googleapis.com"
severity=ERROR
-- Show logs of RPCs made to the UpdateVehicle method.
logName="projects/project-id/logs/fleetengine.googleapis.com%2Fupdate_vehicle"
Show logs for a specific vehicle ID
resource.type="fleetengine.googleapis.com/Fleet"
labels.vehicle_id="vehicle_id"
Show logs for a specific trip ID
- To make sure your query captures all logs, use the
=~
operator. - This filter matches any log that includes the value in the label, rather than performing a strict equality check.
resource.type="fleetengine.googleapis.com/Fleet"
labels.trip_id=~"trip_id"
Show logs for a vehicle over a specific time period
resource.type="fleetengine.googleapis.com/Fleet"
labels.vehicle_id="vehicle_id"
timestamp>="2020-09-24T20:00:00.000Z"
timestamp<"2020-09-24T21:00:00.000Z"
What's next
Explore the contents of your logs and understand log structure.