Documentation ¶
Overview ¶
Package oc provides a cmdutil.Server for opencensus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExporter ¶
NewExporter creates and registers an open census trace exporter as a cmdutil.Server wit the provided trace.Config / ocagent.ExporterOptions.
Types ¶
type Config ¶
type Config struct { // AgentAddress in the form of 'host:port'. Leave empty to disable. // (ocagent.WithAddress). AgentAddress string `env:"OC_AGENT_ADDR"` // ReconnectionPeriod to use when reconnecting to the agent. Defaults to // 5s.(ocagent.WithReconnectionPeriod). ReconnectionPeriod time.Duration `env:"OC_RECONNECTION_PERIOD,default=5s"` // WithInsecure. Defaults to false (ocagent.WithInsecure). WithInsecure bool `env:"OC_INSECURE,default=false"` }
Config of Open Census, via github.com/joeshaw/envdecode
TODO[freeformz]: Support the other ocagent.WithXX options
func (Config) ExporterOptions ¶
func (c Config) ExporterOptions(serviceName string) []ocagent.ExporterOption
ExporterOptions derived from the configuration.
func (Config) TraceConfig ¶
TraceConfig derived from the Config. This currently defaults to AlwaysSample and otherwise Default Max for the other trace.Config items.
TODO[freeformz]: implement determining trace.Config via environment.
Click to show internal directories.
Click to hide internal directories.