otlphttpexporter

package
Version: v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2021 License: Apache-2.0 Imports: 24 Imported by: 17

README

OTLP/HTTP Exporter

Exports traces and/or metrics via HTTP using OTLP format.

Supported pipeline types: traces, metrics, logs

⚠️ OTLP logs format is currently marked as "Beta" and may change in incompatible ways.

The following settings are required:

  • endpoint (no default): The target base URL to send data to (e.g.: https://example.com:4318). To send each signal a corresponding path will be added to this base URL, i.e. for traces "/v1/traces" will appended, for metrics "/v1/metrics" will be appended, for logs "/v1/logs" will be appended.

The following settings can be optionally configured:

  • traces_endpoint (no default): The target URL to send trace data to (e.g.: https://example.com:4318/v1/traces). If this setting is present the endpoint setting is ignored for traces.

  • metrics_endpoint (no default): The target URL to send metric data to (e.g.: https://example.com:4318/v1/metrics). If this setting is present the endpoint setting is ignored for metrics.

  • logs_endpoint (no default): The target URL to send log data to (e.g.: https://example.com:4318/v1/logs). If this setting is present the endpoint setting is ignored logs.

  • tls:

    • insecure (default = false): when set to true disables verifying the server's certificate chain and host name. The connection is still encrypted but server identity is not verified.
    • ca_file path to the CA cert. For a client this verifies the server certificate. Should only be used if insecure is set to false.
    • cert_file path to the TLS cert to use for TLS required connections. Should only be used if insecure is set to false.
    • key_file path to the TLS key to use for TLS required connections. Should only be used if insecure is set to false.
  • compression (default = none): Compression type to use (only gzip is supported today)

  • timeout (default = 30s): HTTP request time limit. For details see https://golang.org/pkg/net/http/#Client

  • read_buffer_size (default = 0): ReadBufferSize for HTTP client.

  • write_buffer_size (default = 512 * 1024): WriteBufferSize for HTTP client.

Example:

exporters:
  otlphttp:
    endpoint: https://example.com:4318/v1/traces

The full list of settings exposed for this exporter are documented here with detailed sample configurations here.

Documentation

Overview

Package otlphttpexporter exports data by using the OTLP format to an HTTP endpoint.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExporterFactory

NewFactory creates a factory for OTLP exporter.

Types

type Config

type Config struct {
	config.ExporterSettings       `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct
	confighttp.HTTPClientSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct.
	exporterhelper.QueueSettings  `mapstructure:"sending_queue"`
	exporterhelper.RetrySettings  `mapstructure:"retry_on_failure"`

	// The URL to send traces to. If omitted the Endpoint + "/v1/traces" will be used.
	TracesEndpoint string `mapstructure:"traces_endpoint"`

	// The URL to send metrics to. If omitted the Endpoint + "/v1/metrics" will be used.
	MetricsEndpoint string `mapstructure:"metrics_endpoint"`

	// The URL to send logs to. If omitted the Endpoint + "/v1/logs" will be used.
	LogsEndpoint string `mapstructure:"logs_endpoint"`

	// The compression key for supported compression types within
	// collector. Currently the only supported mode is `gzip`.
	Compression string `mapstructure:"compression"`
}

Config defines configuration for OTLP/HTTP exporter.

func (*Config) Validate added in v0.25.0

func (cfg *Config) Validate() error

Validate checks if the exporter configuration is valid

Jump to

Keyboard shortcuts

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