Documentation
¶
Index ¶
- func HTML(c *gin.Context, code int, name string, obj interface{})
- func New(opts ...Option) gin.HandlerFunc
- type Option
- func WithEndpointLabelMappingFn(endpointLabelMappingFn RequestLabelMappingFn) Option
- func WithExcludeRegexEndpoint(excludeRegexEndpoint []string) Option
- func WithExcludeRegexMethod(excludeRegexMethod []string) Option
- func WithExcludeRegexStatus(excludeRegexStatus []string) Option
- func WithName(name string) Option
- func WithSpanIdKey(spanIdKey string) Option
- func WithTraceIdKey(traceIdKey string) Option
- func WithTracer(tracerServer *tracer.Server) Option
- func WithWriterSpanId() Option
- func WithWriterTraceId() Option
- type RequestLabelMappingFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
HTML will tracer the rendering of the template as a child of the span in the given context. This is a replacement for gin.Context.HTML function - it invokes the original function after setting up the span.
func New ¶
func New(opts ...Option) gin.HandlerFunc
New returns middleware that will tracer incoming requests. The service parameter should describe the name of the (virtual) webserve handling the request.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option specifies instrumentation configuration options.
func WithEndpointLabelMappingFn ¶
func WithEndpointLabelMappingFn(endpointLabelMappingFn RequestLabelMappingFn) Option
WithEndpointLabelMappingFn set endpointLabelMappingFn function
func WithExcludeRegexEndpoint ¶
WithExcludeRegexEndpoint set excludeRegexEndpoint function regexp
func WithExcludeRegexMethod ¶
WithExcludeRegexMethod set excludeRegexMethod function regexp
func WithExcludeRegexStatus ¶
WithExcludeRegexStatus set excludeRegexStatus function regexp
func WithSpanIdKey ¶
WithSpanIdKey spanIdKey default span-id
func WithTraceIdKey ¶
WithTraceIdKey traceIdKey default trace-id
func WithTracer ¶
WithTracer tracerServer tracer.Server