Documentation ¶
Overview ¶
Package wavefront provides OpenCensus trace and stats support to push metrics, histograms and traces into Wavefront.
Index ¶
- Constants
- type Exporter
- func (e *Exporter) ExportSpan(spanData *trace.SpanData)
- func (e *Exporter) ExportView(viewData *view.Data)
- func (e *Exporter) MetricsDropped() uint64
- func (e *Exporter) ReportSelfHealth()
- func (e *Exporter) SenderErrors() uint64
- func (e *Exporter) SpansDropped() uint64
- func (e *Exporter) Stop()
- func (e *Exporter) StopSelfHealth()
- type Option
- type Options
- type ServiceOptions
Constants ¶
const (
// DefaultQueueSize is used when QueueSize option is not specified
DefaultQueueSize = 1000
)
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 ¶
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 ¶
ExportSpan exports given span to Wavefront
func (*Exporter) ExportView ¶
ExportView exports given view to Wavefront
func (*Exporter) MetricsDropped ¶
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 ¶
SenderErrors counts Sender errors
func (*Exporter) SpansDropped ¶
SpansDropped counts spans dropped when exporter queue is full
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 ¶
QueueSize sets the maximum number of queued metrics and spans. Spans/Metrics are dropped if the Queue is full
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