tracer

package
v4.44.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTraceToLogger added in v4.37.0

func AddTraceToLogger(span tr.Span, logger logger.Provider) logger.Provider

AddTraceToLogger add span ID to the given logger

func AddTracerToClient

func AddTracerToClient(httpClient *http.Client, tracerProvider tr.TracerProvider) *http.Client

AddTracerToClient add tracer to a given http client

func StartSpan added in v4.42.0

func StartSpan(ctx context.Context, tracer tr.Tracer, name string, opts ...tr.SpanStartOption) (context.Context, func(options ...tr.SpanEndOption))

StartSpan starts a span from given context and tracer, if not nil

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App of package

func New

func New(config Config) (App, error)

New creates new App from Config

func (App) Close

func (a App) Close()

Close shutdowns tracer provider gracefully

func (App) GetProvider

func (a App) GetProvider() tr.TracerProvider

GetProvider returns current provider

func (App) GetTracer

func (a App) GetTracer(name string) tr.Tracer

GetTracer return a new tracer

func (App) Middleware

func (a App) Middleware(next http.Handler) http.Handler

Middleware for net/http package allowing tracer with open telemetry

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config of package

func Flags

func Flags(fs *flag.FlagSet, prefix string, overrides ...flags.Override) Config

Flags adds flags for configuring package

Jump to

Keyboard shortcuts

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