create-logs-metric
Aggregate log events into count or distribution metrics. Apply filters and group-by fields to customize the metric from your logs.
Instructions
Create a metric based on log data (count or distribution, with filters and group-by)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The name of the log-based metric. Example: logs.status_code_count | |
| aggregationType | Yes | Aggregation type. 'count' counts log events, 'distribution' creates a distribution metric | |
| path | No | Path to the metric value. Required for distribution metrics. Example: @duration | |
| includePercentiles | No | Whether to include percentile aggregations. Only for distribution metrics | |
| filterQuery | No | Log search query to filter events. Example: service:web-app status:error | |
| groupBy | No | Fields to group the metric by |