tracing

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DebugCfg is a configuration to use to record all traces.
	DebugCfg = &tracingconfig.Config{
		Enable:         true,
		Debug:          true,
		SampleRate:     1,
		ZipkinEndpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans",
	}
	// EnabledZeroSampling is a configuration that enables tracing, but has a sampling rate of zero.
	// The intention is that this allows this to record traces that other components started, but
	// will not start traces itself.
	EnabledZeroSampling = &tracingconfig.Config{
		Enable:         true,
		Debug:          false,
		SampleRate:     0,
		ZipkinEndpoint: "http://zipkin.istio-system.svc.cluster.local:9411/api/v2/spans",
	}
)

Functions

func SetupDynamicZipkinPublishing

func SetupDynamicZipkinPublishing(logger *zap.SugaredLogger, configMapWatcher configmap.Watcher, serviceName string) error

SetupDynamicZipkinPublishing sets up Zipkin trace publishing for the process, by watching a ConfigMap for the configuration. Note that other pieces still need to generate the traces, this just ensures that if generated, they are collected appropriately. This is normally done by using tracing.HTTPSpanMiddleware as a middleware HTTP handler. The configuration will be dynamically updated when the ConfigMap is updated.

func SetupStaticZipkinPublishing

func SetupStaticZipkinPublishing(serviceName string, cfg *tracingconfig.Config) error

SetupStaticZipkinPublishing sets up Zipkin trace publishing for the process. Note that other pieces still need to generate the traces, this just ensures that if generated, they are collected appropriately. This is normally done by using tracing.HTTPSpanMiddleware as a middleware HTTP handler. The configuration will not be dynamically updated.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL