Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Overview

Error Tracking provides fine-grained control of which errors to ingest, helping you reduce noise and avoid unexpected costs.

You can define what data is included in Error Tracking in two ways:

  1. Rules
  2. Rate Limits

You can configure both rules and rate limits on the Logs > Error Tracking > Settings page.

Rules

Rules allow you to select which errors are ingested into Error Tracking.

Each rule consists of:

  • An inclusion filter, which contains a log search query, such as service:my-web-store.
  • Optionally, one or more nested exclusion filters to further refine the rule. For example, an exclusion filter might use the env:staging query to exclude staging logs.

A given rule can be toggled on or off. An error event is included if it matches a query in one of the active inclusion filters, and it does not match any active nested exclusion queries.

Note: Error events that get accepted by a rule might still be excluded from Error Tracking if they lack the required attributes.

Evaluation order

Rules are evaluated in order, with the evaluation stopping at the first matching rule. The priority of the rules and their nested filters depends on their order in the list.

Default rules

By default, Error Tracking has an * inclusion filter and no exclusion filters. This means all error logs with the requirements to be fingerprinted are ingested into Error Tracking.

Add a rule

To add a rule (inclusion filter):

  1. Navigate to Error Tracking Settings.
  2. Click Add New Rule.
  3. Enter a name in the Name field.
  4. Enter a log search query in the Define rule query field.
  5. Click Add new rule.
  6. Optionally, reorder the rules to change their evaluation order. Click and drag the six-dot icon on a given rule to move the rule up or down in the list.
On the right side of each rule is a six-dot icon, which you can drag vertically to reorder rules.

Add a nested exclusion filter to a rule

  1. Expand the rule for which you want to add an exclusion filter.
  2. Click Add Exclusion Filter.
    Expand a rule to see the Add Exclusion Filter option.
  3. Enter a name in the Name field.
  4. Enter a log search query in the Define exclusion filter query field.
  5. Click Save Exclusion Filter.

Rate limits

Rate limits allow you to control the number of indexed error logs included in Error Tracking per day. This cap applies to all indexed error logs that match the inclusion filter of a rule.

After the daily cap is reached, ingestion stops until the next day. You can modify or remove the cap at any time.

Set a rate limit

To set a rate limit:

  1. Navigate to Logs > Error Tracking > Settings.
  2. Click Rate Limits.
  3. Edit the errors/month field.
  4. Click Save Rate Limit.
On the left side of this page, under 'Set your Rate Limit below,' is a drop-down menu where you can set your rate limit.

A Rate limit applied event is generated when the rate limit is reached. See the Event Management documentation for details on viewing and using events.

Screenshot of a 'Rate limit applied' event in the Event Explorer. The event's status is INFO, the source is Error Tracking, the timestamp reads '6h ago', and the title is 'Rate limit applied.' The event is tagged 'source:error_tracking'. The message reads 'Your rate limit has been applied as more than 60000000 logs error events were sent to Error Tracking. Rate limit can be changed from the ingestion control page.

Monitoring usage

You can monitor your Error Tracking usage by setting up monitors and alerts for the datadog.estimated_usage.error_tracking.logs.events metric, which tracks the number of ingested error logs.

This metric is available by default at no additional cost, and its data is retained for 15 months.

Further Reading

PREVIEWING: may/unit-testing