Documentation ¶
Index ¶
- func NewExporter(exporterName, endpoint string, insecure bool) (traceSdk.SpanExporter, error)
- func NewOtlpGrpcExporter(ctx context.Context, endpoint string, insecure bool, ...) (traceSdk.SpanExporter, error)
- func NewOtlpHttpExporter(ctx context.Context, endpoint string, insecure bool, ...) (traceSdk.SpanExporter, error)
- func NewTracerProvider(exporterName, endpoint, serviceName, instanceId, version string, ...) *traceSdk.TracerProvider
- func NewZipkinExporter(_ context.Context, endpoint string) (traceSdk.SpanExporter, error)
- type Option
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExporter ¶
func NewExporter(exporterName, endpoint string, insecure bool) (traceSdk.SpanExporter, error)
NewExporter 创建一个导出器,支持:zipkin、otlp-http、otlp-grpc
func NewOtlpGrpcExporter ¶
func NewOtlpGrpcExporter(ctx context.Context, endpoint string, insecure bool, options ...otlptracegrpc.Option) (traceSdk.SpanExporter, error)
NewOtlpGrpcExporter 创建OTLP/gRPC导出器,默认端口:4317
func NewOtlpHttpExporter ¶
func NewOtlpHttpExporter(ctx context.Context, endpoint string, insecure bool, options ...otlptracehttp.Option) (traceSdk.SpanExporter, error)
NewOtlpHttpExporter 创建OTLP/HTTP导出器,默认端口:4318
func NewTracerProvider ¶
func NewTracerProvider(exporterName, endpoint, serviceName, instanceId, version string, sampler float64) *traceSdk.TracerProvider
NewTracerProvider 创建一个链路追踪器
func NewZipkinExporter ¶
NewZipkinExporter 创建一个zipkin导出器,默认对端地址:http://localhost:9411/api/v2/spans
Types ¶
type Option ¶
type Option func(*options)
func WithGlobalPropagator ¶
func WithGlobalPropagator() Option
func WithGlobalTracerProvider ¶
func WithGlobalTracerProvider() Option
func WithPropagator ¶
func WithPropagator(propagator propagation.TextMapPropagator) Option
func WithTracerName ¶
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
Click to show internal directories.
Click to hide internal directories.