newrelic

package
v14.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 16 Imported by: 0

README

**** Work In Progress, all pricing examples are a best guess and not official ****

New Relic Sink

This sink sends Veneur Metrics, Events, and Distributed Traces to New Relic

Configuration

Se the various newrelic_* keys in keys in example.yaml for all available configuration options.

Status

This sink is in active development

Capabilities

Veneur (/vɛnˈʊr/, rhymes with “assure”) is a distributed, fault-tolerant pipeline for runtime data. It provides a server implementation of the DogStatsD protocol or SSF for aggregating metrics and sending them to downstream storage to one or more supported sinks. It can also act as a global aggregator for histograms, sets and counters.

Here are some examples of why Stripe and other companies are using Veneur today:

  • reducing cost by pre-aggregating metrics such as timers into percentiles
  • creating a vendor-agnostic metric collection pipeline consolidating disparate observability data (from trace spans to metrics, and more!)
  • improving efficiency over other metric aggregator implementations
  • improving reliability by building a more resilient forwarding system over single points of failure

Global *StatsD installations can be problematic, as they either require client-side or proxy sharding behavior to prevent an instance being a Single Point of Failure (SPoF) for all metrics. Veneur aims to solve this problem. Non-global metrics like counters and gauges are collected by a local Veneur instance and sent to storage at flush time. Global metrics (histograms and sets) are forwarded to a central Veneur instance for aggregation before being sent to storage.

Metrics

New Relic's Telemetry Data Platform’s free tier allows for ingesting up to 100GB per month (total) at no cost, regardless of the source or type of data. Leveraging Veneur allows you to easily switch between Metric consumers.

Events

Events allow you to take a high cardinality data point such as userName. New Relic's Telemetry Data Platform’s free tier allows for ingesting up to 100GB per month (total) at no cost, regardless of the source or type of data.

Trace Spans

Distributed Tracing allows you to track the entire customer journey, allowing you to easily determine root cause of an issue across complex microservice environments. New Relic's Telemetry Data Platform’s free tier allows for ingesting up to 100GB per month (total) at no cost, regardless of the source or type of data. New Relic Infinite Tracing observes 100% of all trace data while only storing errors for long-term analysis.

Documentation

Index

Constants

View Source
const (
	DefaultRegion                = region.US
	DefaultEventType             = "veneur"
	DefaultServiceCheckEventType = "veneurCheck"
)

Variables

This section is empty.

Functions

func CreateMetricSink added in v14.2.0

func CreateMetricSink(
	server *veneur.Server, name string, logger *logrus.Entry,
	config veneur.Config, sinkConfig veneur.MetricSinkConfig,
) (sinks.MetricSink, error)

CreateMetricSink creates a new NewRelic sink for metrics. This function should match the signature of a value in veneur.MetricSinkTypes, and is intended to be passed into veneur.NewFromConfig to be called based on the provided configuration.

func CreateSpanSink added in v14.2.0

func CreateSpanSink(
	server *veneur.Server, name string, logger *logrus.Entry,
	config veneur.Config, sinkConfig veneur.SpanSinkConfig,
) (sinks.SpanSink, error)

CreateSpanSink creates a new New Relic sink for spans. This function should match the signature of a value in veneur.SpanSinkTypes, and is intended to be passed into veneur.NewFromConfig to be called based on the provided configuration.

func MigrateConfig added in v14.2.0

func MigrateConfig(conf *veneur.Config)

TODO(arnavdugar): Remove this once the old configuration format has been removed.

func ParseMetricConfig added in v14.2.0

func ParseMetricConfig(
	name string, config interface{},
) (veneur.MetricSinkConfig, error)

ParseConfig decodes the map config for a NewRelic sink into a NewRelicSinkConfig struct.

func ParseSpanConfig added in v14.2.0

func ParseSpanConfig(
	name string, config interface{},
) (veneur.SpanSinkConfig, error)

ParseSpanConfig decodes the map config for a New Relic span sink into a NewRelicSpanSinkConfig struct.

Types

type NewRelicMetricSink

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

func (*NewRelicMetricSink) Flush

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

func (*NewRelicMetricSink) FlushOtherSamples

func (nr *NewRelicMetricSink) FlushOtherSamples(ctx context.Context, samples []ssf.SSFSample)

func (*NewRelicMetricSink) Name

func (nr *NewRelicMetricSink) Name() string

Name returns the name of the sink

func (*NewRelicMetricSink) Start

func (nr *NewRelicMetricSink) Start(c *trace.Client) error

type NewRelicMetricSinkConfig added in v14.2.0

type NewRelicMetricSinkConfig struct {
	AccountID             int               `yaml:"account_id"`
	CommonTags            []string          `yaml:"common_tags"`
	EventType             string            `yaml:"event_type"`
	InsertKey             util.StringSecret `yaml:"insert_key"`
	Region                string            `yaml:"region"`
	ServiceCheckEventType string            `yaml:"service_check_event_type"`
}

type NewRelicSpanSink

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

func (*NewRelicSpanSink) Flush

func (nr *NewRelicSpanSink) Flush()

Flush signals for the sink to send data to New Relic

func (*NewRelicSpanSink) Ingest

func (nr *NewRelicSpanSink) Ingest(ssfSpan *ssf.SSFSpan) error

Ingest takes a span and records it in the New Relic telemetery format to be sent to New Relic on the next Flush()

func (*NewRelicSpanSink) Name

func (nr *NewRelicSpanSink) Name() string

Name returns the name of the sink

func (*NewRelicSpanSink) Start

func (nr *NewRelicSpanSink) Start(c *trace.Client) error

Start

type NewRelicSpanSinkConfig added in v14.2.0

type NewRelicSpanSinkConfig struct {
	CommonTags       []string          `yaml:"common_tags"`
	InsertKey        util.StringSecret `yaml:"insert_key"`
	TraceObserverURL string            `yaml:"trace_observer_url"`
}

Jump to

Keyboard shortcuts

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