package trace

import "cloud.google.com/go/internal/trace"

Index

Constants

const (
	OpenTelemetryTracerName = "cloud.google.com/go"
)

Functions

func EndSpan

func EndSpan(ctx context.Context, err error)

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

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

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.