serializerexporter

package module
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 26 Imported by: 1

Documentation

Overview

Package serializerexporter contains the impleemntation of an exporter which is able to serialize OTLP Metrics to an agent demultiplexer.

Index

Constants

View Source
const (
	// TypeStr defines the serializer exporter type string.
	TypeStr = "serializer"
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory(s serializer.MetricSerializer, enricher tagenricher, hostGetter func(context.Context) (string, error), statsIn chan []byte, wg *sync.WaitGroup) exp.Factory

NewFactory creates a new serializer exporter factory.

Types

type Exporter added in v0.53.0

type Exporter struct {
	// contains filtered or unexported fields
}

Exporter translate OTLP metrics into the Datadog format and sends them to the agent serializer.

func NewExporter added in v0.53.0

func NewExporter(
	set component.TelemetrySettings,
	attributesTranslator *attributes.Translator,
	s serializer.MetricSerializer,
	cfg *ExporterConfig,
	enricher tagenricher,
	hostGetter SourceProviderFunc,
	statsIn chan []byte,
) (*Exporter, error)

NewExporter creates a new exporter that translates OTLP metrics into the Datadog format and sends

func (*Exporter) ConsumeMetrics added in v0.53.0

func (e *Exporter) ConsumeMetrics(ctx context.Context, ld pmetric.Metrics) error

ConsumeMetrics translates OTLP metrics into the Datadog format and sends

type ExporterConfig added in v0.53.0

type ExporterConfig struct {
	// squash ensures fields are correctly decoded in embedded struct
	exporterhelper.TimeoutConfig `mapstructure:",squash"`
	exporterhelper.QueueConfig   `mapstructure:",squash"`

	Metrics MetricsConfig `mapstructure:"metrics"`
}

ExporterConfig defines configuration for the serializer exporter.

type MetricsConfig added in v0.53.0

type MetricsConfig struct {
	Metrics datadogconfig.MetricsConfig `mapstructure:",squash"`

	// TagCardinality is the level of granularity of tags to send for OTLP metrics.
	TagCardinality string `mapstructure:"tag_cardinality"`

	// APMStatsReceiverAddr is the address to send APM stats to.
	APMStatsReceiverAddr string `mapstructure:"apm_stats_receiver_addr"`

	// Tags is a comma-separated list of tags to add to all metrics.
	Tags string `mapstructure:"tags"`
}

MetricsConfig defines the metrics exporter specific configuration options

type SourceProviderFunc added in v0.56.0

type SourceProviderFunc func(context.Context) (string, error)

SourceProviderFunc is an adapter to allow the use of a function as a metrics.HostnameProvider.

func (SourceProviderFunc) Source added in v0.56.0

Source calls f and wraps in a source struct.

Jump to

Keyboard shortcuts

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