trace

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JaegerTracingProviderName = "jaeger"
)

Variables

This section is empty.

Functions

func RegisterTracing

func RegisterTracing(opts *TracingOptions) error

func StartSpan

func StartSpan(ctx context.Context, name string, o ...trace.StartOption) (context.Context, *trace.Span)

StartSpan starts a new child span of the current span in the context. If there is no span in the context, creates a new trace and span.

Returned context contains the newly created span. You can use it to propagate the returned span in process.

Types

type TracingOptions

type TracingOptions struct {
	// Shared
	Provider string
	Service  string
	Debug    bool

	// CollectorEndpoint is the full url to the Jaeger HTTP Thrift collector.
	// For example, http://localhost:14268/api/traces
	JaegerCollectorEndpoint string `mapstructure:"tracing_jaeger_collector_endpoint"`
	// AgentEndpoint instructs exporter to send spans to jaeger-agent at this address.
	// For example, localhost:6831.
	JaegerAgentEndpoint string `mapstructure:"tracing_jaeger_agent_endpoint"`
}

TracingOptions contains the configurations settings for a http server.

Jump to

Keyboard shortcuts

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