Documentation
¶
Overview ¶
Package trace is for collecting tracing data and adapting with backend tracing systems.
Index ¶
- func NewExporter(config *ExporterConfig, customFunc func() (sdktrace.SpanExporter, error)) (tracerProvider *sdktrace.TracerProvider, ...)
- type DefaultExporter
- type Exporter
- type ExporterConfig
- type Option
- func WithAlwaysMode() Option
- func WithB3Propagator() Option
- func WithEnabled() Option
- func WithEndpoint(endpoint string) Option
- func WithExporter(exporter string) Option
- func WithInsecure() Option
- func WithJaegerExporter() Option
- func WithMode(mode string) Option
- func WithNeverMode() Option
- func WithOtlpGrpcExporter() Option
- func WithOtlpHttpExporter() Option
- func WithPropagator(propagator string) Option
- func WithRatio(ratio float64) Option
- func WithRatioMode() Option
- func WithStdoutExporter() Option
- func WithW3cPropagator() Option
- func WithZipkinExporter() Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExporter ¶
func NewExporter(config *ExporterConfig, customFunc func() (sdktrace.SpanExporter, error)) (tracerProvider *sdktrace.TracerProvider, propagator propagation.TextMapPropagator, err error)
NewExporter is an absolute function with @customFunc to create a spec exporter
Types ¶
type DefaultExporter ¶
type DefaultExporter struct {
TracerProvider *sdktrace.TracerProvider
Propagator propagation.TextMapPropagator
}
func (*DefaultExporter) GetPropagator ¶
func (e *DefaultExporter) GetPropagator() propagation.TextMapPropagator
func (*DefaultExporter) GetTracerProvider ¶
func (e *DefaultExporter) GetTracerProvider() *sdktrace.TracerProvider
type Exporter ¶
type Exporter interface {
GetTracerProvider() *sdktrace.TracerProvider
GetPropagator() propagation.TextMapPropagator
}
type ExporterConfig ¶
type Option ¶ added in v3.3.0
type Option func(*Options)
func WithAlwaysMode ¶ added in v3.3.0
func WithAlwaysMode() Option
func WithB3Propagator ¶ added in v3.3.0
func WithB3Propagator() Option
WithB3Propagator b3(for zipkin)
func WithEnabled ¶ added in v3.3.0
func WithEnabled() Option
func WithEndpoint ¶ added in v3.3.0
func WithExporter ¶ added in v3.3.0
func WithInsecure ¶ added in v3.3.1
func WithInsecure() Option
func WithJaegerExporter ¶ added in v3.3.0
func WithJaegerExporter() Option
func WithNeverMode ¶ added in v3.3.0
func WithNeverMode() Option
func WithOtlpGrpcExporter ¶ added in v3.3.0
func WithOtlpGrpcExporter() Option
func WithOtlpHttpExporter ¶ added in v3.3.0
func WithOtlpHttpExporter() Option
func WithPropagator ¶ added in v3.3.0
func WithRatioMode ¶ added in v3.3.0
func WithRatioMode() Option
func WithStdoutExporter ¶ added in v3.3.0
func WithStdoutExporter() Option
func WithW3cPropagator ¶ added in v3.3.0
func WithW3cPropagator() Option
WithW3cPropagator w3c(standard)
func WithZipkinExporter ¶ added in v3.3.0
func WithZipkinExporter() Option
type Options ¶ added in v3.3.0
type Options struct {
Otel *global.OtelConfig
}
func NewOptions ¶ added in v3.3.0
Click to show internal directories.
Click to hide internal directories.