opencensus

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: Apache-2.0 Imports: 9 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableHTTPServerTracing

func EnableHTTPServerTracing(projectID string, percent int) (http.Handler, error)

EnableHTTPServerTracing turns on Stackdriver tracing for HTTP requests on the default ServeMux. The returned handler must be passed to the HTTP server. The supplied projectID can be nil for GCP but might need to be set for other cloud platforms. Refer to the appropriate documentation. The percentage of traced requests can be set between 0 and 100. Note that 0 does not disable tracing entirely but causes the default configuration to be used.

func EnableRPCServerTracing

func EnableRPCServerTracing(projectID string, percent int) ([]grpc.ServerOption, error)

EnableRPCServerTracing turns on Stackdriver tracing. The returned options must be passed to the GRPC server. The supplied projectID can be nil for GCP but might need to be set for other cloud platforms. Refer to the appropriate documentation. The percentage of traced requests can be set between 0 and 100. Note that 0 does not disable tracing entirely but causes the default configuration to be used.

func StartSpan added in v1.3.0

func StartSpan(ctx context.Context, name string) (context.Context, func())

StartSpan starts a new tracing span. The returned context should be used for all child calls within the span, and the returned func should be called to close the span.

Types

This section is empty.

Jump to

Keyboard shortcuts

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