package trace

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

Index

Functions

func EndSpan

func EndSpan(ctx context.Context, err error)

EndSpan ends a span with the given error.

func StartSpan

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

StartSpan adds a span to the trace with the given name.

func TracePrintf

func TracePrintf(ctx context.Context, attrMap map[string]interface{}, format string, args ...interface{})

TODO: (odeke-em): perhaps just pass around spans due to the cost incurred from using trace.FromContext(ctx) yet we could avoid throwing away the work done by ctx, span := trace.StartSpan.

Source Files

trace.go

Version
v0.106.0
Published
Nov 9, 2022
Platform
linux/amd64
Imports
7 packages
Last checked
28 seconds ago

Tools for package owners.