wavefront

package
v0.0.0-...-8af1c95 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package wavefront provides OpenCensus trace and stats support to push metrics, histograms and traces into Wavefront.

Index

Constants

View Source
const (
	// DefaultQueueSize is used when QueueSize option is not specified
	DefaultQueueSize = 1000
)
View Source
const (
	// DefaultSelfReportInterval specifies self-health report interval
	DefaultSelfReportInterval = 5 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {

	// Embeddings
	Options
	// contains filtered or unexported fields
}

Exporter is the main exporter

func NewExporter

func NewExporter(sender senders.Sender, option ...Option) (*Exporter, error)

NewExporter returns a trace.Exporter configured to upload traces and views to the configured wavefront instance (via Wavefront Sender)

Documentation for Wavefront Sender is available at https://github.com/wavefrontHQ/wavefront-sdk-go

Option... add additional options to the exporter.

func (*Exporter) ExportSpan

func (e *Exporter) ExportSpan(spanData *trace.SpanData)

ExportSpan exports given span to Wavefront

func (*Exporter) ExportView

func (e *Exporter) ExportView(viewData *view.Data)

ExportView exports given view to Wavefront

func (*Exporter) MetricsDropped

func (e *Exporter) MetricsDropped() uint64

MetricsDropped counts metrics dropped when exporter queue is full

func (*Exporter) ReportSelfHealth

func (e *Exporter) ReportSelfHealth()

ReportSelfHealth sends exporter specific metrics to wavefront Currently, only dropped span & metric counts are reported

func (*Exporter) SenderErrors

func (e *Exporter) SenderErrors() uint64

SenderErrors counts Sender errors

func (*Exporter) SpansDropped

func (e *Exporter) SpansDropped() uint64

SpansDropped counts spans dropped when exporter queue is full

func (*Exporter) Stop

func (e *Exporter) Stop()

Stop the exporter and flushes the sender

func (*Exporter) StopSelfHealth

func (e *Exporter) StopSelfHealth()

StopSelfHealth stops reporting exporter specific metrics

type Option

type Option func(*Options)

Option allows customization

func AppTags

func AppTags(app application.Tags) Option

AppTags allows setting Application, Service, etc... Shown in Wavefront UI

func DisableSelfHealth

func DisableSelfHealth() Option

DisableSelfHealth disables sending exporter health metrics such as dropped metrics and spans

func Granularity

func Granularity(hgs ...histogram.Granularity) Option

Granularity enables specified granularities when sending Wavefront histograms

func QueueSize

func QueueSize(queueSize int) Option

QueueSize sets the maximum number of queued metrics and spans. Spans/Metrics are dropped if the Queue is full

func Source

func Source(source string) Option

Source overrides the deault source

func VerboseLogging

func VerboseLogging() Option

VerboseLogging enables logging of errors per span/metric. Logs to stderr or equivalent

func WithServiceOptions

func WithServiceOptions(so *ServiceOptions) Option

WithServiceOptions is used for opencensus-service exporter

type Options

type Options struct {
	Source string
	Hgs    map[histogram.Granularity]bool

	VerboseLogging    bool
	DisableSelfHealth bool
	// contains filtered or unexported fields
}

Options is all the configurable options

type ServiceOptions

type ServiceOptions struct {
	SourceOverride    *string           `mapstructure:"override_source,omitempty"`
	ApplicationName   *string           `mapstructure:"application_name,omitempty"`
	ServiceName       *string           `mapstructure:"service_name,omitempty"`
	CustomTags        map[string]string `mapstructure:"custom_tags,omitempty"`
	MaxQueueSize      *int              `mapstructure:"max_queue_size,omitempty"`
	DisableSelfHealth *bool             `mapstructure:"disable_self_health,omitempty"`
	VerboseLogging    *bool             `mapstructure:"verbose_logging,omitempty"`
}

ServiceOptions is used for opencensus-service exporter

Jump to

Keyboard shortcuts

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