这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Jan 26, 2023. It is now read-only.

vmware-archive/opencensus-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VMware has ended active development of this project, this repository will no longer be updated.

Wavefront OpenCensus Go Exporter Build Status Go Report Card

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

It builds on the Wavefront Go SDK.

Requirements

  • Go 1.11 or higher

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.

Currently, DistributionData views will appear as a collection of 5 metrics in Wavefront.

For example, if a metric name is my.dist.metric, it's represented in Wavefront as-

my.dist.metric.count        // represents DistributionData.Count
my.dist.metric.min          // represents DistributionData.Min  
my.dist.metric.max          // represents DistributionData.Max  
my.dist.metric.mean         // represents DistributionData.Mean 
my.dist.metric.sumsq        // represents DistributionData.SumOfSquaredDev

Links

About

Wavefront by VMware exporters for OpenCensus

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7

Languages