googlecloudexporter

package module
v1.29.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

README

Google Cloud Exporter

This exporter can be used to send metrics, traces, and logs to Google Cloud Monitoring. It is an extension of the official Google Cloud Exporter, with additional processors built in to streamline configuration.

Configuration

Field Default Required Description
metric false The metric settings of the exporter.
trace false The trace settings of the exporter.
log false The log settings of the exporter.
credentials false The credentials JSON used to authenticate the GCP client.
credentials_file false The credentials file used to authenticate the GCP client. Ignored if credentials is set.
project false The GCP project used when exporting telemetry data. If not set, the exporter will attempt to extract the value from the specified credentials.
user_agent StanzaLogAgent false Overrides the user agent used when making requests.
timeout 12s false The timeout for API calls.
retry_on_failure false Handle retries when sending data to Google Cloud fails.
sending_queue false Determines how telemetry data is buffered before exporting.
batch false The config of the exporter's batch processor.
append_host true Append the collector's hostname to incoming telemetry if not already present.

Metric Processing Steps

When metric data is received by the Google Cloud Exporter, it is processed in the following steps:

  1. Hostname Detection: Hostname is appended as an attribute on metrics if not already present.
  2. Batch Processor: Metrics are batched to decrease the number of requests.
  3. Google Cloud Exporter: Metrics are exported to GCP.

Log Processing Steps

When log data is received by the Google Cloud Exporter, it is processed in the following steps:

  1. Hostname Detection: Hostname is appended as an attribute on logs if not already present.
  2. Batch Processor: Logs are batched to decrease the number of requests.
  3. Google Cloud Exporter: Logs are exported to GCP.

Trace Processing Steps

When trace data is received by the Google Cloud Exporter, it is processed in the following steps:

  1. Hostname Detection: Hostname is appended as an attribute on traces if not already present.
  2. Batch Processor: Traces are batched to decrease the number of requests.
  3. Google Cloud Exporter: Traces are exported to GCP.

Metric Labels

Unlike the official Google Cloud Exporter, this extension transforms all resource attributes into metric labels by default. Users may still use the resource_filters field in the metric config to overwrite this behavior.

Documentation

Overview

Package googlecloudexporter provides a wrapper around the official googlecloudexporter component that exposes some quality of life improvements in configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(collectorVersion string) exporter.Factory

NewFactory creates a factory for the googlecloud exporter

Types

type Config

type Config struct {
	Credentials     string                 `mapstructure:"credentials"`
	CredentialsFile string                 `mapstructure:"credentials_file"`
	AppendHost      bool                   `mapstructure:"append_host"`
	GCPConfig       *gcp.Config            `mapstructure:",squash"`
	BatchConfig     *batchprocessor.Config `mapstructure:"batch"`
}

Config is the config the google cloud exporter

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL