# Metric

> Resource Metric in pulumi-logtail.

<!-- Generated from the pulumi-logtail SDK. -->

Resource Metric in pulumi-logtail.

Pulumi type: `logtail:index/metric:Metric`.

`name` is the Pulumi resource name. Nested object fields are documented under that object. They are not arguments of this resource.

## Example

Only required arguments are set. A string in angle brackets stands in for that argument. Any other value is an option or example written in the SDK description.

```ts
import * as logtail from "pulumi-logtail"

const resource = new logtail.Metric("metric", {
  sourceId: "<sourceId>",
  sqlExpression: "<sqlExpression>",
})
```

## Arguments

| Property        | Type       | Required | Description                                                                                                                                                     |
| --------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `aggregations`  | `string[]` | no       | The list of aggregations to perform on the metric. Optional: omit it (or set it to an empty list) to create a Label (a group-by dimension) instead of a Metric. |
| `name`          | `string`   | no       | The name of this metric.                                                                                                                                        |
| `sourceId`      | `string`   | yes      | The ID of the source this metric belongs to.                                                                                                                    |
| `sqlExpression` | `string`   | yes      | The SQL expression used to extract the metric value.                                                                                                            |
| `type`          | `string`   | no       | The type of the metric.                                                                                                                                         |

## Outputs

Computed outputs are produced by the provider. They are not constructor arguments.

| Property        | Type       | Computed | Description                                                                                                                                                     |
| --------------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `aggregations`  | `string[]` | no       | The list of aggregations to perform on the metric. Optional: omit it (or set it to an empty list) to create a Label (a group-by dimension) instead of a Metric. |
| `name`          | `string`   | no       | The name of this metric.                                                                                                                                        |
| `sourceId`      | `string`   | no       | The ID of the source this metric belongs to.                                                                                                                    |
| `sqlExpression` | `string`   | no       | The SQL expression used to extract the metric value.                                                                                                            |
| `type`          | `string`   | no       | The type of the metric.                                                                                                                                         |
