signalfx

package
v13.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: MIT Imports: 20 Imported by: 8

README

SignalFx Sink

This sink sends Veneur metrics to SignalFx.

Configuration

See the various signalfx_* keys in example.yaml for all available configuration options.

Status

This sink is stable. This sink does not yet provide all of the functionality that SignalFx allows. Some of Veneur's primitives still need to be mapped to those of SignalFx.

Capabilities

Metrics

Enabled if signalfx_api_key is set to a non-empty value.

  • Counters are counters.
  • Gauges are gauges.

The following tags are mapped to SignalFx fields as follows:

  • The configured Veneur hostname field is sent to SignalFx as the value from signalfx_hostname_tag.

TODO

  • Does not handle events correctly yet, only copies timestamp, title and tags.
  • SignalFx does not have a formal concept of per-metric hosts, so signalfx_hostname_tag may need some work.

Documentation

Index

Constants

View Source
const EventDescriptionMaxLength = 256
View Source
const EventNameMaxLength = 256

Variables

This section is empty.

Functions

This section is empty.

Types

type DPClient

type DPClient dpsink.Sink

A DPClient is a client that can be used to submit signalfx data points to an upstream consumer. It wraps the dpsink.Sink interface.

func NewClient

func NewClient(endpoint, apiKey string, client *http.Client) DPClient

NewClient constructs a new signalfx HTTP client for the given endpoint and API token.

type SignalFxSink

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

SignalFxSink is a MetricsSink implementation.

func NewSignalFxSink

func NewSignalFxSink(hostnameTag string, hostname string, commonDimensions map[string]string, log *logrus.Logger, client DPClient, varyBy string, perTagClients map[string]DPClient, metricNamePrefixDrops []string, metricTagPrefixDrops []string, derivedMetrics samplers.DerivedMetricsProcessor, maxPointsInBatch int, defaultToken string, enableDynamicPerTagTokens bool, dynamicKeyRefreshPeriod time.Duration, metricsEndpoint string, apiEndpoint string, httpClient *http.Client) (*SignalFxSink, error)

NewSignalFxSink creates a new SignalFx sink for metrics.

func (*SignalFxSink) Flush

func (sfx *SignalFxSink) Flush(ctx context.Context, interMetrics []samplers.InterMetric) error

Flush sends metrics to SignalFx

func (*SignalFxSink) FlushOtherSamples

func (sfx *SignalFxSink) FlushOtherSamples(ctx context.Context, samples []ssf.SSFSample)

FlushOtherSamples sends events to SignalFx. Event type samples will be serialized as SFX Events directly. All other metric types are ignored

func (*SignalFxSink) Name

func (sfx *SignalFxSink) Name() string

Name returns the name of this sink.

func (*SignalFxSink) SetExcludedTags

func (sfx *SignalFxSink) SetExcludedTags(excludes []string)

SetExcludedTags sets the excluded tag names. Any tags with the provided key (name) will be excluded.

func (*SignalFxSink) Start

func (sfx *SignalFxSink) Start(traceClient *trace.Client) error

Start begins the sink. For SignalFx this starts the clientByTagUpdater

Jump to

Keyboard shortcuts

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