tracer

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExporterTypeGRPC  ExporterType = "grpc"
	ExporterTypeHTTP  ExporterType = "http"
	ExporterTypeStdio ExporterType = "stdout"

	SamplerTypeAlways     SamplerType = "always"
	SamplerTypeNever      SamplerType = "never"
	SamplerTypeRatioBased SamplerType = "ratio_based"
)

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(ctx context.Context, version string, exporter sdktrace.SpanExporter, opts ...sdktrace.TracerProviderOption) (trace.TracerProvider, error)

NewProvider returns an OTLP exporter based tracer.

Types

type Exporter

type Exporter interface {
	sdktrace.SpanExporter

	Start(context.Context) error
}

func NewConsoleExporter

func NewConsoleExporter(w io.Writer) (Exporter, error)

NewConsoleExporter returns a console exporter.

func NewExporter

func NewExporter(exType, otlpAddress string) (Exporter, error)

func NewGRPCExporter

func NewGRPCExporter(otlpAddress string) (Exporter, error)

NewGRPCExporter returns a gRPC exporter.

func NewHTTPExporter

func NewHTTPExporter(otlpAddress string) (Exporter, error)

NewHTTPExporter returns a HTTP exporter.

type ExporterType

type ExporterType string

type NoopExporter

type NoopExporter struct{}

func NewNoopExporter

func NewNoopExporter() *NoopExporter

func (NoopExporter) ExportSpans

func (n NoopExporter) ExportSpans(_ context.Context, _ []sdktrace.ReadOnlySpan) error

func (NoopExporter) MarshalLog

func (n NoopExporter) MarshalLog() interface{}

func (NoopExporter) Shutdown

func (n NoopExporter) Shutdown(_ context.Context) error

func (NoopExporter) Start

func (n NoopExporter) Start(_ context.Context) error

type SamplerType

type SamplerType string

Jump to

Keyboard shortcuts

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