Documentation
¶
Index ¶
- func ContextWithSpan(parent context.Context, span trace.Span) context.Context
- func Default() trace.TracerProvider
- func LoggerLabel(ctx context.Context) []zap.Field
- func Middleware(serviceName string, tracerProvider trace.TracerProvider) gin.HandlerFunc
- func New(opt ...Option) (trace.TracerProvider, error)
- func NewWithConfig(ctx context.Context, cfg *Config, options ...Option) (trace.TracerProvider, error)
- func RegisterExporter(name string, f NewExporterFunc)
- func SpanFromContext(ctx context.Context) trace.Span
- func Trace(ctx context.Context, config *configs.Config) error
- func TracerFromContext(ctx context.Context) trace.Tracer
- type Config
- type ExporterType
- type NewExporterFunc
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithSpan ¶
func Default ¶
func Default() trace.TracerProvider
func Middleware ¶
func Middleware(serviceName string, tracerProvider trace.TracerProvider) gin.HandlerFunc
Middleware 链路追踪中间件
func NewWithConfig ¶
func RegisterExporter ¶
func RegisterExporter(name string, f NewExporterFunc)
Types ¶
type ExporterType ¶
type ExporterType string
const ( Jaeger ExporterType = "jaeger" UpTrace ExporterType = "uptrace" )
type NewExporterFunc ¶
type Option ¶
type Option func(*Options)
func AppendAttributes ¶
func WithExporter ¶
func WithExporter(exp tracesdk.SpanExporter) Option
Click to show internal directories.
Click to hide internal directories.