This is documentation for the next version of Grafana Alloy Documentation. For the latest stable release, go to the latest version.
otelcol.auth.google
Public preview: This is a public preview component. Public preview components are subject to breaking changes, and may be replaced with equivalent functionality that cover the same use case. To enable and use a public preview component, you must set the
stability.levelflag topublic-previewor below.
otelcol.auth.google exposes a handler that other otelcol components can use to authenticate requests using Google Application Default Credentials.
This component only supports client authentication.
The authorization tokens can be used by HTTP and gRPC based OpenTelemetry exporters. This component can fetch and refresh expired tokens automatically. Refer to the Google Cloud Documentation for more information about Application Default Credentials.
Note
otelcol.auth.googleis a wrapper over the upstream OpenTelemetry Collectorgoogleclientauthextension. Bug reports or feature requests will be redirected to the upstream repository, if necessary.
You can specify multiple otelcol.auth.google components by giving them different labels.
Usage
otelcol.auth.google "<LABEL>" {
project = "<PROJECT_ID>"
}Arguments
You can use the following arguments with otelcol.auth.google:
If project isn’t set, Alloy uses the project from the Application Default Credentials.
Blocks
You can use the following blocks with otelcol.auth.google:
debug_metrics
The debug_metrics block configures the metrics that this component generates to monitor its state.
The following arguments are supported:
disable_high_cardinality_metrics is the Alloy equivalent to the telemetry.disableHighCardinalityMetrics feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.
Note
If configured,
disable_high_cardinality_metricsonly applies tootelcol.exporter.*andotelcol.receiver.*components.
Exported fields
The following fields are exported and can be referenced by other components:
Component health
otelcol.auth.google is only reported as unhealthy if given an invalid configuration.
Debug information
otelcol.auth.google doesn’t expose any component-specific debug information.
Example
This example configures otelcol.exporter.otlp to use otelcol.auth.google for authentication:
otelcol.exporter.otlp "google" {
client {
endpoint = "telemetry.googleapis.com"
auth = otelcol.auth.google.creds.handler
}
}
otelcol.auth.google "creds" {
project = "myproject"
}


