Documentation ¶
Overview ¶
Package opencensus enables tracing and metrics collection using OpenCensus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableHTTPServerTracing ¶
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.
Types ¶
This section is empty.