> ## Documentation Index
> Fetch the complete documentation index at: https://otel.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Snowflake

> OpenTelemetry receiver for Snowflake

# Snowflake Receiver

![Status](https://img.shields.io/badge/status-alpha-red)

**Available in:** `contrib`

**Maintainers:** [@dmitryax](https://github.com/dmitryax), [@shalper2](https://github.com/shalper2)

**Source:** [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/snowflakereceiver)

## Supported Telemetry

![Metrics](https://img.shields.io/badge/metrics-alpha-green)

## Overview

## Configuration

The following settings are required:

* `username` (no default): Specifies username used to authenticate with Snowflake.
* `password` (no default): Specifies the password associated with designated username. Used to authenticate with Snowflake.
* `account` (no default): Specifies the account from which metrics are to be gathered.
* `warehouse` (no default): Specifies the warehouse, or unit of computer, designated for the metric gathering queries. Must be an existing warehouse in your Snowflake account.

The following settings are optional:

* `metrics` (default: see [`DefaultMetricSettings`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/snowflakereceiver/internal/metadata/generated_metrics.go)): Controls the enabling/disabling of specific metrics. See [in-depth documentation on the allowable metrics](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/snowflakereceiver/documentation.md).
* `schema` (default: 'ACCOUNT\_USAGE'): Snowflake DB schema containing usage statistics and metadata to be monitored.
* `database` (default: 'SNOWFLAKE'): Snowflake DB containing schema with usage statistics and metadata to be monitored.
* `role` (default: 'ACCOUNTADMIN'): Role associated with the username designated above. By default admin privileges are required to access most/all of the usage data.
* `collection_interval` (default: 30m): Collection interval for metrics receiver. The value for this setting must be readable by golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration).

Example:

```yaml theme={null}
receivers:
  snowflake:
    username: snowflakeuser
    password: securepassword
    account: bigbusinessaccount
    warehouse: metricWarehouse
    collection_interval: 5m
    metrics:
      snowflake.database.bytes_scanned.avg:
        enabled: true
      snowflake.query.bytes_deleted.avg:
        enabled: false
```

The full list of settings exposed for this receiver are documented in [config.go](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/snowflakereceiver/config.go) with a detailed sample configuration in [testdata/config.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/snowflakereceiver/testdata/config.yaml)

## Metrics

| Metric Name                                             | Description                                                                                                       | Unit       | Type  | Attributes                                                                                                     |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ---------- | ----- | -------------------------------------------------------------------------------------------------------------- |
| ❌ `snowflake.billing.cloud_service.total`               | Reported total credits used in the cloud service over the last 24 hour window.                                    | \{credits} | Gauge | service\_type                                                                                                  |
| ❌ `snowflake.billing.total_credit.total`                | Reported total credits used across account over the last 24 hour window.                                          | \{credits} | Gauge | service\_type                                                                                                  |
| ❌ `snowflake.billing.virtual_warehouse.total`           | Reported total credits used by virtual warehouse service over the last 24 hour window.                            | \{credits} | Gauge | service\_type                                                                                                  |
| ❌ `snowflake.billing.warehouse.cloud_service.total`     | Credits used across cloud service for given warehouse over the last 24 hour window.                               | \{credits} | Gauge | warehouse\_name                                                                                                |
| ❌ `snowflake.billing.warehouse.total_credit.total`      | Total credits used associated with given warehouse over the last 24 hour window.                                  | \{credits} | Gauge | warehouse\_name                                                                                                |
| ❌ `snowflake.billing.warehouse.virtual_warehouse.total` | Total credits used by virtual warehouse service for given warehouse over the last 24 hour window.                 | \{credits} | Gauge | warehouse\_name                                                                                                |
| ✅ `snowflake.database.bytes_scanned.avg`                | Average bytes scanned in a database over the last 24 hour window.                                                 | By         | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ✅ `snowflake.database.query.count`                      | Total query count for database over the last 24 hour window.                                                      | 1          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.logins.total`                              | Total login attempts for account over the last 24 hour window.                                                    | 1          | Gauge | error\_message, reported\_client\_type, is\_success                                                            |
| ❌ `snowflake.pipe.credits_used.total`                   | Snow pipe credits contotaled over the last 24 hour window.                                                        | \{credits} | Gauge | pipe\_name                                                                                                     |
| ✅ `snowflake.query.blocked`                             | Blocked query count for warehouse over the last 24 hour window.                                                   | 1          | Gauge | warehouse\_name                                                                                                |
| ✅ `snowflake.query.bytes_deleted.avg`                   | Average bytes deleted in database over the last 24 hour window.                                                   | By         | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.query.bytes_spilled.local.avg`             | Average bytes spilled (intermediate results do not fit in memory) by local storage over the last 24 hour window.  | By         | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.query.bytes_spilled.remote.avg`            | Average bytes spilled (intermediate results do not fit in memory) by remote storage over the last 24 hour window. | By         | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ✅ `snowflake.query.bytes_written.avg`                   | Average bytes written by database over the last 24 hour window.                                                   | By         | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ✅ `snowflake.query.compilation_time.avg`                | Average time taken to compile query over the last 24 hour window.                                                 | s          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.query.data_scanned_cache.avg`              | Average percentage of data scanned from cache over the last 24 hour window.                                       | 1          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ✅ `snowflake.query.executed`                            | Executed query count for warehouse over the last 24 hour window.                                                  | 1          | Gauge | warehouse\_name                                                                                                |
| ✅ `snowflake.query.execution_time.avg`                  | Average time spent executing queries in database over the last 24 hour window.                                    | s          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.query.partitions_scanned.avg`              | Number of partitions scanned during query so far over the last 24 hour window.                                    | 1          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ✅ `snowflake.query.queued_overload`                     | Overloaded query count for warehouse over the last 24 hour window.                                                | 1          | Gauge | warehouse\_name                                                                                                |
| ✅ `snowflake.query.queued_provision`                    | Number of compute resources queued for provisioning over the last 24 hour window.                                 | 1          | Gauge | warehouse\_name                                                                                                |
| ✅ `snowflake.queued_overload_time.avg`                  | Average time spent in warehouse queue due to warehouse being overloaded over the last 24 hour window.             | s          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ✅ `snowflake.queued_provisioning_time.avg`              | Average time spent in warehouse queue waiting for resources to provision over the last 24 hour window.            | s          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ✅ `snowflake.queued_repair_time.avg`                    | Average time spent in warehouse queue waiting for compute resources to be repaired over the last 24 hour window.  | s          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.rows_deleted.avg`                          | Number of rows deleted from a table (or tables) over the last 24 hour window.                                     | \{rows}    | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.rows_inserted.avg`                         | Number of rows inserted into a table (or tables) over the last 24 hour window.                                    | \{rows}    | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.rows_produced.avg`                         | Average number of rows produced by statement over the last 24 hour window.                                        | \{rows}    | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.rows_unloaded.avg`                         | Average number of rows unloaded during data export over the last 24 hour window.                                  | \{rows}    | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.rows_updated.avg`                          | Average number of rows updated in a table over the last 24 hour window.                                           | \{rows}    | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |
| ❌ `snowflake.session_id.count`                          | Distinct session id's associated with snowflake username over the last 24 hour window.                            | 1          | Gauge | user\_name                                                                                                     |
| ❌ `snowflake.storage.failsafe_bytes.total`              | Number of bytes of data in Fail-safe.                                                                             | By         | Gauge |                                                                                                                |
| ✅ `snowflake.storage.stage_bytes.total`                 | Number of bytes of stage storage used by files in all internal stages (named, table, user).                       | By         | Gauge |                                                                                                                |
| ✅ `snowflake.storage.storage_bytes.total`               | Number of bytes of table storage used, including bytes for data currently in Time Travel.                         | By         | Gauge |                                                                                                                |
| ✅ `snowflake.total_elapsed_time.avg`                    | Average elapsed time over the last 24 hour window.                                                                | s          | Gauge | schema\_name, execution\_status, error\_message, query\_type, warehouse\_name, database\_name, warehouse\_size |

## Attributes

| Attribute Name         | Description                                            | Type   | Values |
| ---------------------- | ------------------------------------------------------ | ------ | ------ |
| `database_name`        | Name of database being queried (default is snowflake). | string |        |
| `error_message`        | Error message reported by query if present.            | string |        |
| `execution_status`     | Execution status of query being reported.              | string |        |
| `is_success`           | Login status (success or failure).                     | string |        |
| `pipe_name`            | Name of snowpipe.                                      | string |        |
| `query_type`           | Type of query performed.                               | string |        |
| `reported_client_type` | Client type used for attempt.                          | string |        |
| `schema_name`          | Name of schema associated with query result.           | string |        |
| `service_type`         | Service type associated with metric query.             | string |        |
| `user_name`            | Username in query being reported.                      | string |        |
| `warehouse_name`       | Name of warehouse in query being reported on.          | string |        |
| `warehouse_size`       | Size of warehouse being reported on.                   | string |        |

## Resource Attributes

| Attribute Name           | Description                               | Type   | Enabled |
| ------------------------ | ----------------------------------------- | ------ | ------- |
| `snowflake.account.name` | Snowflake account being used by receiver. | string | ✅       |

## Configuration

### Example Configuration

```yaml theme={null}
snowflake:
  # required settings
  username: snowflakeuser
  password: securepassword
  account: bigbusinessaccount
  warehouse: metricWarehouse
  # optional settings (i.e. have defaults)
  collection_interval: 18m
  metrics:
    snowflake.database.bytes_scanned.avg:
      enabled: true
    snowflake.query.bytes_deleted.avg:
      enabled: false
  role: customMonitoringRole
```

***

*Last generated: 2026-07-06*
