8000 GitHub - asutoshpalai/opencensus-exporter: Wavefront by VMware exporters for OpenCensus
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

asutoshpalai/opencensus-exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wavefront OpenCensus Go Exporter Build Status

This exporter provides OpenCensus trace and stats support to push metrics, histograms and traces into Wavefront.

It builds on the Wavefront Go SDK.

Usage

  1. Import the SDK and Exporter packages.

    import (
        "github.com/wavefronthq/wavefront-sdk-go/senders"
        "github.com/wavefronthq/opencensus-exporter/wavefront"
        "go.opencensus.io/stats/view"
        "go.opencensus.io/trace"
    )
  2. Initialize the Sender and Exporter.

    sender, _ := senders.NewProxySender(senders.ProxyConfiguration{/*...*/})
    exporter, _ = wavefront.NewExporter(sender, /*options...*/)
    
    defer func() {  // Flush before application exits
        exporter.Stop()
        sender.Close()
    }()

    The exporter supports functional options. See Exporter Options

  3. Register the exporter

    trace.RegisterExporter(exporter)    // for exporting traces
    view.RegisterExporter(exporter)     // for exporting metrics
  4. Instrument your code using OpenCensus. Learn more at https://opencensus.io/quickstart/go/

Exporter Options

Option Description
Source(string) Overrides the source tag that is sent in Metrics and Traces
QueueSize(int) Sets the maximum number of metrics and spans queued before new ones are dropped. QueueSize must be >= 0
AppTags(application.Tags) Sets the application tags. See example and SDK for more info
Granularity(histogram.Granularity...) Sets the histogram Granularities that must be sent. See SDK docs
DisableSelfHealth() Disables reporting exporter health such as dropped metrics, spans, etc...
VerboseLogging() Logs individual errors to stderr

See examples folder for a complete example.

Requirements

  • Go 1.9 or higher

Links

About

Wavefront by VMware exporters for OpenCensus

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%
0