exporters

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package exporters holds the type of exporters that consul telemetery supports

Index

Constants

This section is empty.

Variables

View Source
var (
	// HCPExporterID is the id of the HCP otel exporter.
	HCPExporterID = component.NewIDWithName(otlpHTTPExporterName, "hcp")
	// BaseOtlpExporterID is the id of a base otel exporter.
	BaseOtlpExporterID = component.NewID(otlpHTTPExporterName)
	// GRPCOtlpExporterID is the id of the grpc otel exporter.
	GRPCOtlpExporterID = component.NewID(otlpGRPCExporterName)
)
View Source
var LoggingExporterID component.ID = component.NewID(loggingExporterName)

LoggingExporterID is the component.ID value used by the logging exporter.

Functions

func OtlpExporterCfg

func OtlpExporterCfg(e *ExporterConfig) (*confmap.Conf, error)

OtlpExporterCfg generates the configuration for a otlp exporter.

Types

type ExporterConfig

type ExporterConfig struct {
	// Endpoint to send strings to it
	Endpoint string `mapstructure:"endpoint"`
	// Auth configuration for the exporter
	Auth *configauth.Authentication `mapstructure:"auth"`
	// Headers are the explicit extra headers that should be sent with the exporter
	Headers map[string]string `mapstructure:"headers,omitempty"`

	// TLSSetting struct exposes TLS client configuration.
	TLSSetting *types.TLSClientSetting `mapstructure:"tls,omitempty"`

	// The compression key for supported compression types within collector.
	Compression string `mapstructure:"compression"`

	// Timeout is the http request time limit
	Timeout string `mapstructure:"timeout,omitempty"`
}

ExporterConfig is a base wrapper around the otlphttpexorter which we cannot use directly since our golden tests can't handle the comparisons unfortunately. https://pkg.go.dev/go.opentelemetry.io/collector/exporter/otlphttpexporter@v0.72.0#section-readme

func OtlpExporterHCPCfg

func OtlpExporterHCPCfg(endpoint, resourceID string, authID component.ID) *ExporterConfig

OtlpExporterHCPCfg generates the config for an otlp exporter to HCP.

type LoggingConfig

type LoggingConfig struct {
	// Verbosity defines the logging exporter verbosity.
	Verbosity configtelemetry.Level `mapstructure:"verbosity"`

	// SamplingInitial defines how many samples are initially logged during each second.
	SamplingInitial int `mapstructure:"sampling_initial"`

	// SamplingThereafter defines the sampling rate after the initial samples are logged.
	SamplingThereafter int `mapstructure:"sampling_thereafter"`
}

LoggingConfig is temporary until we can use the config under this module:

"go.opentelemetry.io/collector/exporter/loggingexporter"

A bug exists that I have patched here but it's pending on CLA acceptance

func LogExporterCfg

func LogExporterCfg() *LoggingConfig

LogExporterCfg generates the configuration for a logging exporter.

Jump to

Keyboard shortcuts

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