Logs

Learn more about the logs section of the Bearer Dashboard.

Logging works a little differently in Bearer. To help you find the right logs, Bearer allows you to create Log Collections.

Log Collections are a way to group specific types of API calls. Bearer includes default collections for anomalies and remediations. Depending on your plan, you can create additional log collections to capture just the logs you need to make debugging APIs easier.

View a Collection

Log collections will collect log records that match their criteria up to a maximum number of records. You can reset the collection, or pause the recording to limit the logs that will be captured. When a collection fills up, it will stop recording and stop saving log records. At that point, you can choose to reset the collection back to zero (0) to continue collecting logs. This is useful for finding the "needle in the haystack" when debugging a problem.

This section includes all API captured by the log collection. You can search through logs, filter by API, and narrow the date range. When payload logging is enabled for an API, you can also search the payload of the request and response.

From an individual log record, you can even create a new Anomaly Rule or Remediation Rule, and create a share link to the log entry.

Create a New Log Collection

To create a new collection, select the Create a Collection button from the Logs screen.

Creating a new collection is similar to creating a new anomaly or remediation, but with fewer requirements. Collections require a name, the APIs it will apply to, and at least one filter.

Just as with anomalies and remediations, collections can filter by the following options:

  • HTTP Method

  • Status Code

  • Connection Error

  • Path

  • Parameters

  • Request and Response Headers

Once your log collection has been saved and created, it will appear in the Logs section of the dashboard and begin recording any API calls matching the defined filters.

FAQ

What can I search inside logs?

You can search inside the full request and response of each request. That includes the path, the query parameters, and the headers. When enabled on the API level, you can also search the full payload of the request and response.

How long does Bearer keep the logs history?

The data retention depends on your Bearer account. See you plan details for the data retention period of your account.

Is there any limits on the size of the payload?

Bearer truncates the request and response bodies to 32kb each.