Documentation ¶
Index ¶
- func NewHTTPClient() *http.Client
- func NewHTTPTransport(base http.RoundTripper, tags ...tag.Mutator) http.RoundTripper
- func Start(options ...StartOption) io.Closer
- type StartOption
- func StartWithTraceExportCloser(traceExportCloser TraceExportCloser) StartOption
- func StartWithTraceViewExportCloser(traceViewExportCloser TraceViewExportCloser) StartOption
- func StartWithTracerProviderCloser(tracerProviderCloser TracerProviderCloser) StartOption
- func StartWithViewExportCloser(viewExportCloser ViewExportCloser) StartOption
- type TraceExportCloser
- type TraceViewExportCloser
- type TracerProviderCloser
- type ViewExportCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClient ¶
NewHTTPClient returns a HTTP client instrumented with OpenCensus traces and metrics.
func NewHTTPTransport ¶
func NewHTTPTransport(base http.RoundTripper, tags ...tag.Mutator) http.RoundTripper
NewHTTPTransport returns a HTTP transport instrumented with OpenCensus traces and metrics.
func Start ¶
func Start(options ...StartOption) io.Closer
Start initializes tracing.
Tracing is a global function due to how go.opencensus.io is written. The returned io.Closer needs to be called at the completion of the program.
Types ¶
type StartOption ¶
type StartOption func(*startOptions)
StartOption is an option for start.
func StartWithTraceExportCloser ¶
func StartWithTraceExportCloser(traceExportCloser TraceExportCloser) StartOption
StartWithTraceExportCloser returns a new StartOption that adds the given TraceExportCloser.
func StartWithTraceViewExportCloser ¶
func StartWithTraceViewExportCloser(traceViewExportCloser TraceViewExportCloser) StartOption
StartWithTraceViewExportCloser returns a new StartOption that adds the given TraceViewExportCloser.
func StartWithTracerProviderCloser ¶ added in v1.8.0
func StartWithTracerProviderCloser(tracerProviderCloser TracerProviderCloser) StartOption
func StartWithViewExportCloser ¶
func StartWithViewExportCloser(viewExportCloser ViewExportCloser) StartOption
StartWithViewExportCloser returns a new StartOption that adds the given TraceExportCloser.
type TraceExportCloser ¶
TraceExportCloser describes the interface used to export OpenCensus traces and cleaning of resources.
type TraceViewExportCloser ¶
type TraceViewExportCloser interface { ViewExportCloser TraceExportCloser }
TraceViewExportCloser implements both OpenCensus view and trace exporting.
type TracerProviderCloser ¶ added in v1.8.0
type TracerProviderCloser interface { oteltrace.TracerProvider io.Closer }