trace

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: AGPL-3.0 Imports: 15 Imported by: 1

Documentation

Overview

Package trace provides functionalities for tracing instrumentation.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidTracesOutput indicates that the defined traces output is not valid.
	ErrInvalidTracesOutput = errors.New("invalid traces output")
	// ErrInvalidProto indicates that the defined exporter protocol is not valid.
	ErrInvalidProto = errors.New("invalid protocol")
	// ErrInvalidURLScheme indicates that the defined exporter URL scheme is not valid.
	ErrInvalidURLScheme = errors.New("invalid URL scheme")
	// ErrInvalidGRPCWithURLPath indicates that an exporter using gRPC protocol does not support URL path.
	ErrInvalidGRPCWithURLPath = errors.New("grpc protocol does not support URL path")
)

Functions

This section is empty.

Types

type TracerProvider

type TracerProvider struct {
	trace.TracerProvider
	// contains filtered or unexported fields
}

TracerProvider provides methods for tracers initialization and shutdown of the processing pipeline.

func NewNoopTracerProvider

func NewNoopTracerProvider() *TracerProvider

NewNoopTracerProvider creates a new noop TracerProvider.

func NewTracerProvider

func NewTracerProvider(ctx context.Context, params tracerProviderParams) (*TracerProvider, error)

NewTracerProvider creates a new tracer provider.

func TracerProviderFromConfigLine

func TracerProviderFromConfigLine(ctx context.Context, line string) (*TracerProvider, error)

TracerProviderFromConfigLine initializes a new TracerProvider based on the configuration specified through input line.

Supported format is: otel[=<endpoint>:<port>,<other opts>] Where endpoint and port default to: 127.0.0.1:4317 And other opts accept:

  • proto: http or grpc (default).
  • header.<header_name>

Example: otel=127.0.0.1:4318/v1/traces,proto=http,header.Authorization=token ***

func (*TracerProvider) Shutdown

func (tp *TracerProvider) Shutdown(ctx context.Context) error

Shutdown shuts down the TracerProvider releasing any held computational resources. After Shutdown is called, all methods are no-ops.

Jump to

Keyboard shortcuts

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