Documentation ¶
Index ¶
- func ExportersFromYAMLConfig(config []byte) (traceExporters []exporter.TraceExporter, ...)
- type Config
- func (c *Config) CanRunOpenCensusMetricsReceiver() bool
- func (c *Config) CanRunOpenCensusTraceReceiver() bool
- func (c *Config) CheckLogicalConflicts(blob []byte) error
- func (c *Config) JaegerReceiverEnabled() bool
- func (c *Config) JaegerReceiverPorts() (collectorPort, thriftPort int)
- func (c *Config) OpenCensusReceiverAddress() string
- func (c *Config) OpenCensusReceiverCorsAllowedOrigins() []string
- func (c *Config) ZPagesDisabled() bool
- func (c *Config) ZPagesPort() (int, bool)
- func (c *Config) ZipkinReceiverAddress() string
- func (c *Config) ZipkinReceiverEnabled() bool
- type Exporters
- type ReceiverConfig
- type Receivers
- type ZPagesConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportersFromYAMLConfig ¶
func ExportersFromYAMLConfig(config []byte) (traceExporters []exporter.TraceExporter, metricsExporters []exporter.MetricsExporter, doneFns []func() error, err error)
ExportersFromYAMLConfig parses the config yaml payload and returns the respective exporters from:
- datadog
- stackdriver
- zipkin
- jaeger
- kafka
- opencensus
- prometheus
Types ¶
type Config ¶
type Config struct { Receivers *Receivers `yaml:"receivers"` ZPages *ZPagesConfig `yaml:"zpages"` Exporters *Exporters `yaml:"exporters"` }
Config denotes the configuration for the various elements of an agent, that is: * Receivers * ZPages * Exporters
func ParseOCAgentConfig ¶
ParseOCAgentConfig unmarshals byte content in the YAML file format to retrieve the configuration that will be used to run the OpenCensus agent.
func (*Config) CanRunOpenCensusMetricsReceiver ¶
CanRunOpenCensusMetricsReceiver returns true if the configuration permits running the OpenCensus Metrics receiver.
func (*Config) CanRunOpenCensusTraceReceiver ¶
CanRunOpenCensusTraceReceiver returns true if the configuration permits running the OpenCensus Trace receiver.
func (*Config) CheckLogicalConflicts ¶
CheckLogicalConflicts serves to catch logical errors such as if the Zipkin receiver port conflicts with that of the exporter, lest we'll have a self DOS because spans will be exported "out" from the exporter, yet be received from the receiver, then sent back out and back in a never ending loop.
func (*Config) JaegerReceiverEnabled ¶
JaegerReceiverEnabled returns true if Config is non-nil and if the Jaeger receiver configuration is also non-nil.
func (*Config) JaegerReceiverPorts ¶
JaegerReceiverPorts is a helper to safely retrieve the address that the Jaeger receiver will run on.
func (*Config) OpenCensusReceiverAddress ¶
OpenCensusReceiverAddress is a helper to safely retrieve the address that the OpenCensus receiver will be bound to. If Config is nil or the OpenCensus receiver's configuration is nil, it will return the default of ":55678"
func (*Config) OpenCensusReceiverCorsAllowedOrigins ¶ added in v0.1.0
OpenCensusReceiverCorsAllowedOrigins is a helper to safely retrieve the list of allowed CORS origins for HTTP/JSON requests to the grpc-gateway adapter.
func (*Config) ZPagesDisabled ¶
ZPagesDisabled returns true if zPages have not been enabled. It returns true if Config is nil or if ZPages are explicitly disabled.
func (*Config) ZPagesPort ¶
ZPagesPort tries to dereference the port on which zPages will be served. If zPages are disabled, it returns (-1, false) Else if no port is set, it returns the default 55679
func (*Config) ZipkinReceiverAddress ¶
ZipkinReceiverAddress is a helper to safely retrieve the address that the Zipkin receiver will run on. If Config is nil or the Zipkin receiver's configuration is nil, it will return the default of "localhost:9411"
func (*Config) ZipkinReceiverEnabled ¶
ZipkinReceiverEnabled returns true if Config is non-nil and if the Zipkin receiver configuration is also non-nil.
type Exporters ¶
type Exporters struct {
Zipkin *exporterparser.ZipkinConfig `yaml:"zipkin"`
}
Exporters denotes the configurations for the various backends that this service exports observability signals to.
type ReceiverConfig ¶
type ReceiverConfig struct { // The address to which the OpenCensus receiver will be bound and run on. Address string `yaml:"address"` CollectorHTTPPort int `yaml:"collector_http_port"` CollectorThriftPort int `yaml:"collector_thrift_port"` // The allowed CORS origins for HTTP/JSON requests the grpc-gateway adapter // for the OpenCensus receiver. See github.com/rs/cors // An empty list means that CORS is not enabled at all. A wildcard (*) can be // used to match any origin or one or more characters of an origin. CorsAllowedOrigins []string `yaml:"cors_allowed_origins"` // DisableTracing disables trace receiving and is only applicable to trace receivers. DisableTracing bool `yaml:"disable_tracing"` // DisableMetrics disables metrics receiving and is only applicable to metrics receivers. DisableMetrics bool `yaml:"disable_metrics"` }
ReceiverConfig is the per-receiver configuration that identifies attributes that a receiver's configuration can have such as: * Address * Various ports
type Receivers ¶
type Receivers struct { OpenCensus *ReceiverConfig `yaml:"opencensus"` Zipkin *ReceiverConfig `yaml:"zipkin"` Jaeger *ReceiverConfig `yaml:"jaeger"` }
Receivers denotes configurations for the various telemetry ingesters, such as: * Jaeger * OpenCensus * Zipkin
type ZPagesConfig ¶
ZPagesConfig denotes the configuration that zPages will be run with.