tracer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tracer provides a global OpenTelemetry tracer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(opts ...func(*options)) (func(context.Context) error, error)

Init initialises the global tracer via the option(s) defaulting to a noop tracer.

func Start

func Start(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span)

Start creates a span and a context.Context containing the newly-created span from the global tracer. See go.opentelemetry.io/otel/trace#Start for more details.

func WithJaeger

func WithJaeger(addr string) func(*options)

WithJaeger returns an option to configure an OpenTelemetry tracing exporter for Jaeger.

func WithJaegerOrNoop

func WithJaegerOrNoop(jaegerAddr string) func(*options)

WithJaegerOrNoop returns an option to configure an OpenTelemetry tracing exporter for Jaeger if the address is not empty, else the default noop tracer is retained.

func WithStdOut

func WithStdOut(w io.Writer) func(*options)

WithStdOut returns an option to configure an OpenTelemetry exporter for tracing telemetry to be written to an output destination as JSON.

Types

This section is empty.

Jump to

Keyboard shortcuts

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