opentsdbexporter

package module
v0.0.0-...-d8b2754 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() exporter.Factory

func NewMetricsExporter

func NewMetricsExporter(config component.Config, logger *zap.Logger, set exporter.CreateSettings) (exporter.Metrics, error)

Types

type Config

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

	// OpenTSDB Endpoint
	confighttp.HTTPClientSettings `mapstructure:",squash"`

	// The maximum number of datapoints to send to the OpenTSDB backend
	BatchSize int `mapstructure:"batch_size"`
	// The maximum number of tags per datapoint
	MaxTags int `mapstructure:"max_tags"`
	// Tags to skip
	SkipTags []string `mapstructure:"skip_tags"`

	// ResourceToTelemetrySettings is the option for converting resource attributes to telemetry attributes.
	// "Enabled" - A boolean field to enable/disable this option. Default is `false`.
	// If enabled, all the resource attributes will be converted to metric labels by default.
	ResourceToTelemetrySettings resourcetotelemetry.Settings `mapstructure:"resource_to_telemetry_conversion"`
}

func (*Config) Validate

func (cfg *Config) Validate() error

type HttpSerializer

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

func NewHttpSerializer

func NewHttpSerializer(logger *zap.Logger, maxTags int, skipTags []string) *HttpSerializer

func (*HttpSerializer) Marshal

func (h *HttpSerializer) Marshal(metrics pmetric.Metrics) (sMetrics []*Metric, errs []error)

type Metric

type Metric struct {
	Metric    string            `json:"metric"`
	Timestamp uint64            `json:"timestamp"`
	Value     interface{}       `json:"value"`
	Tags      map[string]string `json:"tags"`
}

func (Metric) String

func (m Metric) String() string

type OpenTSDBExporter

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

func NewOpenTSDBExporter

func NewOpenTSDBExporter(config *Config, set exporter.CreateSettings, logger *zap.Logger) *OpenTSDBExporter

func (*OpenTSDBExporter) PushMetrics

func (e *OpenTSDBExporter) PushMetrics(ctx context.Context, md pmetric.Metrics) error

Jump to

Keyboard shortcuts

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