Documentation
¶
Overview ¶
Package tracing consolidates the setup logic for using opencensus tracing and exporting the metrics to https://cloud.google.com/trace. In order to authenticate to the correct API, any service account that uses this package must have the Cloud Trace Agent Role in gcp.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize(traceSampleProportion float64, projectID string, defaultAttrs map[string]interface{}) error
Initialize sets up trace options and exporting for this application. It will sample the given proportion of traces. All traces will have the given key-value pairs attached.
func InitializeOtel ¶
func InitializeOtel() error
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package loggingtracer provides a trace.Tracer that wraps trace.DefaultTracer and logs span starts/ends and durations.
|
Package loggingtracer provides a trace.Tracer that wraps trace.DefaultTracer and logs span starts/ends and durations. |
Package tracingtest provides helpers for testing opencensus tracing instrumentation.
|
Package tracingtest provides helpers for testing opencensus tracing instrumentation. |
Click to show internal directories.
Click to hide internal directories.