azureblobexporter

package module
v1.51.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

README

Azure Blob Exporter

This exporter allows you to export metrics, traces, and logs to Azure Blob Storage. Telemetry is exported in OpenTelemetry Protocol JSON format.

Minimum Agent Versions

Supported Pipelines

  • Metrics
  • Logs
  • Traces

How It Works

  1. The exporter marshals any telemetry sent to it into OTLP Json Format. It will apply compression if configured to do so.
  2. Exports telemetry to Azure Blob Storage. See Blob Path for more information on the expected blob path format.

Configuration

Field Type Default Required Description
connection_string string true The connection string to the Azure Blob Storage account. Can be found under the Access keys section of your storage account.
container string true The name of the container in the storage account to save to.
blob_prefix string false An optional prefix to prepend to blob file name.
root_folder string false An optional root folder that will prefix the blob path.
partition string minute true Time granularity of blob name. Valid values are hour or minute.
compression string none false The type of compression applied to the data before sending it to storage. Valid values are none and gzip.
Blob Path

Blob paths will be in the form:

{root_folder}/year=XXXX/month=XX/day=XX/hour=XX/minute=XX

Example Configurations

Minimal Configuration

This configuration only specifies a container and the connection string. The exporter will use the default partition of minute and will not apply compression.

azureblob:
    connection_string: "DefaultEndpointsProtocol=https;AccountName=storage_account_name;AccountKey=storage_account_key;EndpointSuffix=core.windows.net"
    container: "my-container"

Example Blob Names:

year=2021/month=01/day=01/hour=01/minute=00/metrics_{random_id}.json
year=2021/month=01/day=01/hour=01/minute=00/logs_{random_id}.json
year=2021/month=01/day=01/hour=01/minute=00/traces_{random_id}.json
Hour Partition Configuration

This shows specifying a partition of hour and that the minute=XX portion of the blob path will be omitted.

azureblob:
    connection_string: "DefaultEndpointsProtocol=https;AccountName=storage_account_name;AccountKey=storage_account_key;EndpointSuffix=core.windows.net"
    container: "my-container"
    partition: "hour"

Example Blob Names:

year=2021/month=01/day=01/hour=01/metrics_{random_id}.json
year=2021/month=01/day=01/hour=01/logs_{random_id}.json
year=2021/month=01/day=01/hour=01/traces_{random_id}.json
Full Configuration with compression

This configuration shows all fields filled out and that gzip compression is configured.

azureblob:
    connection_string: "DefaultEndpointsProtocol=https;AccountName=storage_account_name;AccountKey=storage_account_key;EndpointSuffix=core.windows.net"
    container: "my-container"
    root_folder: "otel"
    blob_prefix: "linux"
    partition: "minute"
    compression: "gzip"

Example Blob Names:

otel/year=2021/month=01/day=01/hour=01/minute=00/linuxmetrics_{random_id}.json.gz
otel/year=2021/month=01/day=01/hour=01/minute=00/linuxlogs_{random_id}.json.gz
otel/year=2021/month=01/day=01/hour=01/minute=00/linuxtraces_{random_id}.json.gz

Documentation

Overview

Package azureblobexporter stores OpenTelemetry data as an Azure Blob exporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() exporter.Factory

NewFactory creates a factory for Azure Blob Exporter

Types

type Config

type Config struct {
	exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
	exporterhelper.QueueSettings   `mapstructure:"sending_queue"`
	configretry.BackOffConfig      `mapstructure:"retry_on_failure"`

	// ConnectionString is the Azure Blob Storage connection key,
	// which can be found in the Azure Blob Storage resource on the Azure Portal. (no default)
	ConnectionString string `mapstructure:"connection_string"`

	// Container is the name of the user created storage container. (no default)
	Container string `mapstructure:"container"`

	// BlobPrefix is the blob prefix defined by the user. (no default)
	BlobPrefix string `mapstructure:"blob_prefix"`

	// RootFolder is the name of the root folder in path.
	RootFolder string `mapstructure:"root_folder"`

	// Partition is the time granularity of the blob.
	// Valid values are "hour" or "minute". Default: minute
	Partition partitionType `mapstructure:"partition"`

	// Compression is the type of compression to use.
	// Valid values are "none" or "gzip". Default: none
	Compression compressionType `mapstructure:"compression"`
}

Config the configuration for the azureblob exporter

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the config.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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