Versions in this module Expand all Collapse all v2 v2.2.2 Jul 13, 2022 v2.2.1 Jul 13, 2022 v2.2.0 Jul 13, 2022 Changes in this version + const ContextKey + const Namespace + var DefaultViews = []*view.View + var ErrNoConfig = errors.New("no extra config defined for the opencensus module") + func BackendFactory(bf proxy.BackendFactory) proxy.BackendFactory + func GetAggregatedPathForBackendMetrics(cfg *config.Backend) func(r *http.Request) string + func GetAggregatedPathForMetrics(cfg *config.EndpointConfig) func(r *http.Request) string + func HTTPRequestExecutor(clientFactory transport.HTTPClientFactory) transport.HTTPRequestExecutor + func HTTPRequestExecutorFromConfig(clientFactory transport.HTTPClientFactory, cfg *config.Backend) transport.HTTPRequestExecutor + func IsBackendEnabled() bool + func IsPipeEnabled() bool + func IsRouterEnabled() bool + func Middleware(name string) proxy.Middleware + func NewHTTPClient(ctx context.Context) *http.Client + func ProxyFactory(pf proxy.Factory) proxy.FactoryFunc + func Register(ctx context.Context, srvCfg config.ServiceConfig, vs ...*view.View) error + func RegisterExporterFactories(ef ExporterFactory) + func RequestAttrs(r *http.Request) []trace.Attribute + func ResponseAttrs(resp *http.Response) []trace.Attribute + func SpanNameFromURL(req *http.Request) string + func TraceStatus(httpStatusCode int, statusLine string) trace.Status + type Config struct + EnabledLayers *EnabledLayers + Exporters Exporters + ReportingPeriod int + SampleRate int + type DataDogConfig struct + DisableCountPerBuckets bool + GlobalTags map[string]interface{} + Namespace string + Service string + StatsAddr string + Tags []string + TraceAddr string + type EnabledLayers struct + Backend bool + Pipe bool + Router bool + type EndpointExtraConfig struct + PathAggregation string + type ExporterFactory func(context.Context, Config) (interface{}, error) + type Exporters struct + DataDog *DataDogConfig + ExtraConfig config.ExtraConfig + InfluxDB *InfluxDBConfig + Jaeger *JaegerConfig + Logger *struct{} + Newrelic *NewrelicConfig + Ocagent *OcagentConfig + Prometheus *PrometheusConfig + Stackdriver *StackdriverConfig + Xray *XrayConfig + Zipkin *ZipkinConfig + type InfluxDBConfig struct + Address string + BufferSize int + Database string + InstanceName string + Password string + PingEnabled bool + Timeout string + Username string + type JaegerConfig struct + BufferMaxCount int + Endpoint string + ServiceName string + type NewrelicConfig struct + ApiKey string + ServiceName string + type OcagentConfig struct + Address string + EnaableCompression bool + Headers map[string]string + Insecure bool + Reconnection string + ServiceName string + type PrometheusConfig struct + HostTag bool + MethodTag bool + Namespace string + PathTag bool + Port int + StatusCodeTag bool + type StackdriverConfig struct + DefaultLabels map[string]string + MetricPrefix string + ProjectID string + type Transport struct + Base http.RoundTripper + FormatSpanName func(*http.Request) string + GetStartOptions func(*http.Request) trace.StartOptions + NewClientTrace func(*http.Request, *trace.Span) *httptrace.ClientTrace + Propagation propagation.HTTPFormat + StartOptions trace.StartOptions + func (t *Transport) CancelRequest(req *http.Request) + func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) + type XrayConfig struct + AccessKey string + Region string + SecretKey string + UseEnv bool + Version string + type ZipkinConfig struct + CollectorURL string + IP string + Port int + ServiceName string