tracing

package
v1.3.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableEchoAutoTracing

func EnableEchoAutoTracing(e *echo.Echo, name string)

EnableEchoAutoTracing adds opentelemetry middleware to echo server for automated tracing instrumentation.

func EnableGrpcClientTracing

func EnableGrpcClientTracing(opts []grpc.DialOption) []grpc.DialOption

EnableGrpcClientTracing adds automated tracing instrumentation to client options.

func EnableGrpcServerTracing

func EnableGrpcServerTracing(opts []grpc.ServerOption) []grpc.ServerOption

EnableGrpcServerTracing adds automated tracing instrumentation to server options.

func NewTraceExporterGRPC

func NewTraceExporterGRPC(otelgrpcURL, service string, attribs map[string]string) (func(context.Context) error, error)

NewTraceExporterGRPC creates and start a new exporter of traces to the provided otelgrpcURL using gRPC The tracing definition is annotated with the service string attribute. Other trace attributes can be provided by the attribs map. The function returns a function to call the shutdown of the trace.

func NewTraceExporterHTTP

func NewTraceExporterHTTP(otelURL, service string, attribs map[string]string) (func(context.Context) error, error)

NewTraceExporterHTTP creates and starts a new exporter of traces to the provided otelURL using HTTP The tracing definition is annotated with the service string attribute. Other trace attributes can be provided by the attribs map. The function returns a function to call the shutdown of the trace.

func StartTrace

func StartTrace(ctx context.Context, servicename, traceName string) context.Context

StartTrace starts a new trace and a child span of it. It must be used with StopTrace function to end the child span. StopTrace can be used with defer statement after StartTrace call.

func StartTraceFromRemote

func StartTraceFromRemote(ctx context.Context, servicename, traceName string) (context.Context, error)

func StopTrace

func StopTrace(ctx context.Context)

StopTrace ends a span trace from the provided context. StopTrace can be used with defer statement after StartTrace call.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL