tracing

package
v0.0.0-...-667100c Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Meter

func Meter() metric.Meter

func NewMetric

func NewMetric(opts ...MetricOption) core.Component

func NewTracer

func NewTracer(opts ...TraceOption) core.Component

func SpanFromContext

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

Types

type Config

type Config struct {
	ServiceName     string
	ServiceVersion  string
	ServiceInstance string
	Environment     string  // dev, test, prod
	Endpoint        string  // host:port
	Authorization   string  // basic auth api key
	SampleRate      float64 // sample rate default is 1
}

type MetricOption

type MetricOption func(c *metricComponent)

func WithMetricOption

func WithMetricOption(opts ...sdkmetric.Option) MetricOption

func WithMetricProvider

func WithMetricProvider(provider metric.MeterProvider) MetricOption

func WithMetricReader

func WithMetricReader(reader sdkmetric.Reader) MetricOption

func WithMetricStdoutReader

func WithMetricStdoutReader() MetricOption

type TraceOption

type TraceOption func(c *traceComponent)

func WithTraceExporter

func WithTraceExporter(exporter sdktrace.SpanExporter, opts ...sdktrace.BatchSpanProcessorOption) TraceOption

func WithTraceProvider

func WithTraceProvider(provider trace.TracerProvider) TraceOption

func WithTraceProviderOption

func WithTraceProviderOption(opts ...sdktrace.TracerProviderOption) TraceOption

func WithTraceSampler

func WithTraceSampler(sampler sdktrace.Sampler) TraceOption

func WithTraceStdoutExporter

func WithTraceStdoutExporter() TraceOption

Jump to

Keyboard shortcuts

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