Log-based metrics count the log entries that match a given filter for the
current project. For example, you could create a metric to track the number of
trips created over time with the following query:
For an overview and instructions on how to create log-based metrics, see
Log-based metrics.
Set up alerts
You can create alerts to notify customers when a metric falls out of a defined
threshold, and specify notification channels for those alerts. See Configure
log-based alerting policies.
[null,null,["Last updated 2025-03-01 UTC."],[[["Log-based metrics are created using filters to count matching log entries within a project, like tracking trip creation events."],["Metrics data starts accumulating only after metric creation and doesn't include pre-existing log entries."],["You can set up alerts to get notified when a metric violates pre-defined thresholds."],["For further log analysis and insights, you can integrate with BigQuery."]]],["Log-based metrics track log entries matching a filter within a project. An example is tracking the number of trips created over time using a specific query. Metrics are populated only with data from logs received after the metric's creation. Users can set up alerts for metrics that exceed defined thresholds, with notifications sent to specified channels. Further, logs can be analysed using BigQuery.\n"]]