package trace
import "cloud.google.com/go/internal/trace"
Index ¶
- Constants
- func EndSpan(ctx context.Context, err error)
- func StartSpan(ctx context.Context, name string) context.Context
- func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{})
Constants ¶
const (
OpenTelemetryTracerName = "cloud.google.com/go"
)
Functions ¶
func EndSpan ¶
EndSpan ends an OpenTelemetry span with the given error.
The default experimental tracing support for OpenCensus is now deprecated in the Google Cloud client libraries for Go.
func StartSpan ¶
StartSpan adds an OpenTelemetry span to the trace with the given name.
The default experimental tracing support for OpenCensus is now deprecated in the Google Cloud client libraries for Go.
func TracePrintf ¶
func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{})
TracePrintf retrieves the current OpenTelemetry span from context, then calls Span.AddEvent. The expected span must be an OpenTelemetry span. The default experimental tracing support for OpenCensus is now deprecated in the Google Cloud client libraries for Go.
Source Files ¶
trace.go
- Version
- v0.118.3 (latest)
- Published
- Feb 20, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 5 hours ago –
Tools for package owners.