Documentation ¶
Index ¶
- Variables
- func DefaultTransport() *http.Transport
- func DoPost(ctx context.Context, url string, req interface{}, v interface{}) error
- func DoRequest(ctx context.Context, tr *http.Transport, req *http.Request, v interface{}) error
- func GetContextFrom(c *gin.Context) (ctx context.Context)
- func GetGinContext(ctx context.Context) *gin.Context
- func GetParentIDFromSpan(ctx context.Context) string
- func GetSpanIDFromContext(ctx context.Context) string
- func GetTraceFieldFrom(ctx context.Context) []interface{}
- func GetTraceIDFromContext(ctx context.Context) string
- func GetUrlFromContext(ctx context.Context) string
- func NewTracer(serviceName string, addr string) (opentracing.Tracer, io.Closer, error)
- func OpenTracingClientInterceptor() grpc.UnaryClientInterceptor
- func OpenTracingServerInterceptor() grpc.UnaryServerInterceptor
- func SetSamplingFrequency(n int)
- func StartSpan(ctx context.Context, operationName string, f func() error, ...) (context.Context, error)
- func TracerWrapper(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var StartSpanFromContext = opentracing.StartSpanFromContext
Functions ¶
func DefaultTransport ¶
func GetContextFrom ¶
ContextWithSpan 返回context
func GetParentIDFromSpan ¶
func GetSpanIDFromContext ¶
func GetTraceFieldFrom ¶
func GetTraceIDFromContext ¶
func GetUrlFromContext ¶
func OpenTracingClientInterceptor ¶
func OpenTracingClientInterceptor() grpc.UnaryClientInterceptor
func OpenTracingServerInterceptor ¶
func OpenTracingServerInterceptor() grpc.UnaryServerInterceptor
func SetSamplingFrequency ¶
func SetSamplingFrequency(n int)
SetSamplingFrequency 设置采样频率 0 <= n <= 100
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.