signalfxexporter

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 31 Imported by: 10

README

SignalFx Metrics Exporter

This exporter can be used to send metrics to SignalFx.

Apart from metrics, the exporter is also capable of sending metric metadata (properties and tags) to SignalFx. Currently, only metric metadata updates from the k8s_cluster receiver are supported.

The following configuration options are required:

  • access_token (no default): AccessToken is the authentication token provided by SignalFx.
  • realm (no default): SignalFx realm where the data will be received.

The following configuration options can also be configured:

  • headers (no default): Headers to pass in the payload.
  • timeout (default = 5s): Amount of time to wait for a send operation to complete.
  • ingest_url (no default): Destination where SignalFx metrics are sent. If realm is set, this option is derived and will be https://ingest.{realm}.signalfx.com/v2/datapoint. If a value is explicitly set, the value of realm will not be used in determining ingest_url. The explicit value will be used instead. If path is not specified, /v2/datapoint is used.
  • api_url (no default): Destination to which SignalFx properties and tags are sent. If realm is set, this option is derived and will be https://api.{realm}.signalfx.com/. If a value is explicitly set, the value of realm will not be used in determining api_url. The explicit value will be used instead.
  • log_dimension_updates (default = false): Whether or not to log dimension updates.
  • access_token_passthrough: (default = true) Whether to use "com.splunk.signalfx.access_token" metric resource label, if any, as SFx access token. In either case this label will be dropped during final translation. Intended to be used in tandem with identical configuration option for SignalFx receiver to preserve datapoint origin.

Note: Either realm or both ingest_url and api_url should be explicitly set.

Example:

exporters:
  signalfx:
    access_token: <replace_with_actual_access_token>
    access_token_passthrough: true
    headers:
      added-entry: "added value"
      dot.test: test
    realm: us1
    timeout: 5s

Beyond standard YAML configuration as outlined in the sections that follow, exporters that leverage the net/http package (all do today) also respect the following proxy environment variables:

  • HTTP_PROXY
  • HTTPS_PROXY
  • NO_PROXY

If set at Collector start time then exporters, regardless of protocol, will or will not proxy traffic as defined by these environment variables.

Documentation

Overview

Package signalfxexporter implements an exporter that sends data to SignalFx.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	config *Config,
	logger *zap.Logger,
) (component.MetricsExporterOld, error)

New returns a new SignalFx exporter.

Types

type Config

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

	// AccessToken is the authentication token provided by SignalFx.
	AccessToken string `mapstructure:"access_token"`

	// Realm is the SignalFx realm where data is going to be sent to. The
	// default value is "us0"
	Realm string `mapstructure:"realm"`

	// IngestURL is the destination to where SignalFx metrics will be sent to, it is
	// intended for tests and debugging. The value of Realm is ignored if the
	// URL is specified. If a path is not included the exporter will
	// automatically append the appropriate path, eg.: "v2/datapoint".
	// If a path is specified it will use the one set by the config.
	IngestURL string `mapstructure:"ingest_url"`

	// APIURL is the destination to where SignalFx metadata will be sent. This
	// value takes precedence over the value of Realm
	APIURL string `mapstructure:"api_url"`

	// Timeout is the maximum timeout for HTTP request sending trace data. The
	// default value is 5 seconds.
	Timeout time.Duration `mapstructure:"timeout"`

	// Headers are a set of headers to be added to the HTTP request sending
	// trace data. These can override pre-defined header values used by the
	// exporter, eg: "User-Agent" can be set to a custom value if specified
	// here.
	Headers map[string]string `mapstructure:"headers"`

	// Whether to log dimension updates being sent to SignalFx.
	LogDimensionUpdates bool `mapstructure:"log_dimension_updates"`

	splunk.AccessTokenPassthroughConfig `mapstructure:",squash"`
}

Config defines configuration for SignalFx exporter.

type Factory

type Factory struct {
}

Factory is the factory for SignalFx exporter.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Exporter

CreateDefaultConfig creates the default configuration for exporter.

func (*Factory) CreateMetricsExporter

func (f *Factory) CreateMetricsExporter(
	logger *zap.Logger,
	config configmodels.Exporter,
) (component.MetricsExporterOld, error)

CreateMetricsExporter creates a metrics exporter based on this config.

func (*Factory) CreateTraceExporter

func (f *Factory) CreateTraceExporter(
	logger *zap.Logger,
	config configmodels.Exporter,
) (component.TraceExporterOld, error)

CreateTraceExporter creates a trace exporter based on this config.

func (*Factory) Type

func (f *Factory) Type() configmodels.Type

Type gets the type of the Exporter config created by this factory.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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