otela

package
v0.0.0-...-834ce46 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExporterGrpc    = Exporter("grpc")
	ExporterConsole = Exporter("console")
)

Variables

This section is empty.

Functions

func AddFloat64Counter

func AddFloat64Counter(ctx context.Context, meter metric.Meter, name, desc string, cv float64, options ...metric.Float64CounterOption)

func Configure

func Configure(wg *sync.WaitGroup, done <-chan bool, cfg Config) error

func EchoRequestLoggerLogValuesFunc

func EchoRequestLoggerLogValuesFunc(packageName, functionName string) func(c echo.Context, v middleware.RequestLoggerValues) error

func GetCarrierFromContext

func GetCarrierFromContext(ctx context.Context) map[string]string

func GetContextFromCarrier

func GetContextFromCarrier(carrier map[string]string) context.Context

func IncrementFloat64Counter

func IncrementFloat64Counter(ctx context.Context, meter metric.Meter, name, desc string, options ...metric.Float64CounterOption)

func NewTracer

func NewTracer(name string, options ...trace.TracerOption) trace.Tracer

func TraceBuilder

func TraceBuilder(packageName, functionName string, options ...TracerOptions) (context.Context, trace.Span)

Types

type Config

type Config struct {
	Endpoint           string
	ServiceName        string
	EnableMetricExpose bool
	MetricExposePath   string
	MetricExposePort   int
	Exporter           Exporter
}

type Exporter

type Exporter string

type Otel

type Otel struct {
	Endpoint           string `koanf:"endpoint"`
	ServiceName        string `koanf:"service_name"`
	EnableMetricExpose bool   `koanf:"enable_metric_expose"`
	MetricExposePort   int    `koanf:"metric_expose_port"`
	MetricExposePath   string `koanf:"metric_expose_path"`
}

type TracerOptions

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

func WithCarrier

func WithCarrier(carrier map[string]string) TracerOptions

func WithContext

func WithContext(ctx context.Context) TracerOptions

func WithSpanOptionAttributes

func WithSpanOptionAttributes(attributes ...attribute.KeyValue) TracerOptions

func WithSpanOptions

func WithSpanOptions(options ...trace.SpanStartOption) TracerOptions

func WithTracerOptions

func WithTracerOptions(options ...trace.TracerOption) TracerOptions

Jump to

Keyboard shortcuts

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