azureblobreceiver

package module
v0.82.0 Latest Latest
Warning

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

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

README

Azure Blob Receiver

Status
Stability development: logs, traces
Distributions contrib
Issues Open issues Closed issues
Code Owners @eedorenko, @mx-psi

This receiver reads logs and trace data from Azure Blob Storage.

Configuration

The following settings are required:

  • connection_string: (no default): Azure Blob Storage connection key, which can be found in the Azure Blob Storage resource on the Azure Portal.
  • event_hub: endpoint: (no default): Azure Event Hub endpoint triggering on the Blob Create event

The following settings can be optionally configured:

  • logs: container_name: (default = "logs"): Name of the blob container with the logs
  • traces: container_name: (default = "traces"): Name of the blob container with the traces

Example:

receivers:
  azureblob:
    connection_string: DefaultEndpointsProtocol=https;AccountName=accountName;AccountKey=+idLkHYcL0MUWIKYHm2j4Q==;EndpointSuffix=core.windows.net
    event_hub:
      endpoint: Endpoint=sb://oteldata.servicebus.windows.net/;SharedAccessKeyName=otelhubbpollicy;SharedAccessKey=mPJVubIK5dJ6mLfZo1ucsdkLysLSQ6N7kddvsIcmoEs=;EntityPath=otellhub    

The receiver subscribes on the events published by Azure Blob Storage and handled by Azure Event Hub. When it receives Blob Create event, it reads the logs or traces from a corresponding blob and deletes it after processing.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory returns a factory for Azure Blob receiver.

Types

type Config

type Config struct {
	// 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"`
	// Configurations of Azure Event Hub triggering on the `Blob Create` event
	EventHub EventHubConfig `mapstructure:"event_hub"`
	// Logs related configurations
	Logs LogsConfig `mapstructure:"logs"`
	// Traces related configurations
	Traces TracesConfig `mapstructure:"traces"`
}

type EventHubConfig

type EventHubConfig struct {
	// Azure Event Hub endpoint triggering on the `Blob Create` event
	EndPoint string `mapstructure:"endpoint"`
}

type LogsConfig

type LogsConfig struct {
	// Name of the blob container with the logs (default = "logs")
	ContainerName string `mapstructure:"container_name"`
}

type MockBlobClient added in v0.63.0

type MockBlobClient struct {
	mock.Mock
}

type MockLogsDataConsumer added in v0.63.0

type MockLogsDataConsumer struct {
	mock.Mock
}

type MockTracesDataConsumer added in v0.63.0

type MockTracesDataConsumer struct {
	mock.Mock
}

type TracesConfig

type TracesConfig struct {
	// Name of the blob container with the traces (default = "traces")
	ContainerName string `mapstructure:"container_name"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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