package stackdriver
import "go.opencensus.io/exporter/stats/stackdriver"
Package stackdriver contains the OpenCensus exporters for Stackdriver Monitoring.
Please note that the Stackdriver exporter is currently experimental.
Index ¶
- type Exporter
- func NewExporter(o Options) (*Exporter, error)
- func (e *Exporter) Export(vd *stats.ViewData)
- func (e *Exporter) Flush()
- type Options
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter exports stats to the Stackdriver Monitoring.
func NewExporter ¶
NewExporter returns an exporter that uploads stats data to Stackdriver Monitoring. Only one Stackdriver exporter should be created per process.
func (*Exporter) Export ¶
Export exports to the Stackdriver Monitoring if view data has one or more rows.
func (*Exporter) Flush ¶
func (e *Exporter) Flush()
Flush waits for exported view data to be uploaded.
This is useful if your program is ending and you do not want to lose recent spans.
type Options ¶
type Options struct { // ProjectID is the identifier of the Stackdriver // project the user is uploading the stats data to. ProjectID string // OnError is the hook to be called when there is // an error occured when uploading the stats data. // If no custom hook is set, errors are logged. // Optional. OnError func(err error) // ClientOptions are additional options to be passed // to the underlying Stackdriver Monitoring API client. // Optional. ClientOptions []option.ClientOption // BundleDelayThreshold determines the max amount of time // the exporter can wait before uploading view data to // the backend. // Optional. BundleDelayThreshold time.Duration // BundleCountThreshold determines how many view data events // can be buffered before batch uploading them to the backend. // Optional. BundleCountThreshold int // Resource is an optional field that represents the Stackdriver // MonitoredResource, a resource that can be used for monitoring. // If no custom ResourceDescriptor is set, a default MonitoredResource // with type global and no resource labels will be used. // Optional. Resource *monitoredrespb.MonitoredResource }
Options contains options for configuring the exporter.
Source Files ¶
stackdriver.go
- Version
- v0.1.0
- Published
- Dec 15, 2017
- Platform
- js/wasm
- Imports
- 25 packages
- Last checked
- 4 hours ago –
Tools for package owners.