opencensus

package
v0.0.0-...-0deb509 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package opencensus implements a github.com/virtual-kubelet/virtual-kubelet/trace.Tracer using opencensus as a backend.

Use this by setting `trace.T = Adapter{}`

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableTraceExporters

func AvailableTraceExporters() []string

AvailableTraceExporters gets the list of registered exporters

func GetTracingExporter

func GetTracingExporter(name string, opts TracingExporterOptions) (trace.Exporter, error)

GetTracingExporter gets the specified tracing exporter passing in the options to the exporter init function. For an exporter to be availbale here it must be registered with `RegisterTracingExporter`.

func NewJaegerExporter

func NewJaegerExporter(opts TracingExporterOptions) (trace.Exporter, error)

NewJaegerExporter creates a new opencensus tracing exporter.

func NewOCAgentExporter

func NewOCAgentExporter(opts TracingExporterOptions) (trace.Exporter, error)

NewOCAgentExporter creates a new opencensus tracing exporter using the opencensus agent forwarder.

func RegisterTracingExporter

func RegisterTracingExporter(name string, f TracingExporterInitFunc)

RegisterTracingExporter registers a tracing exporter. For a user to select an exporter, it must be registered here.

Types

type Adapter

type Adapter struct{}

Adapter implements the trace.Tracer interface for OpenCensus

func (Adapter) StartSpan

func (Adapter) StartSpan(ctx context.Context, name string) (context.Context, trace.Span)

StartSpan creates a new span from opencensus using the given name.

type TracingExporterInitFunc

type TracingExporterInitFunc func(TracingExporterOptions) (trace.Exporter, error)

TracingExporterInitFunc is the function that is called to initialize an exporter. This is used when registering an exporter and called when a user specifed they want to use the exporter.

type TracingExporterOptions

type TracingExporterOptions struct {
	Tags        map[string]string
	ServiceName string
}

Jump to

Keyboard shortcuts

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