gintrace

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTML

func HTML(c *gin.Context, code int, name string, obj interface{})

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

func WithExcludeRegexEndpoint(excludeRegexEndpoint []string) Option

WithExcludeRegexEndpoint set excludeRegexEndpoint function regexp

func WithExcludeRegexMethod

func WithExcludeRegexMethod(excludeRegexMethod []string) Option

WithExcludeRegexMethod set excludeRegexMethod function regexp

func WithExcludeRegexStatus

func WithExcludeRegexStatus(excludeRegexStatus []string) Option

WithExcludeRegexStatus set excludeRegexStatus function regexp

func WithName added in v0.2.3

func WithName(name string) Option

WithName name default Service

func WithSpanIdKey

func WithSpanIdKey(spanIdKey string) Option

WithSpanIdKey spanIdKey default span-id

func WithTraceIdKey

func WithTraceIdKey(traceIdKey string) Option

WithTraceIdKey traceIdKey default trace-id

func WithTracer

func WithTracer(tracerServer *tracer.Server) Option

WithTracer tracerServer tracer.Server

func WithWriterSpanId

func WithWriterSpanId() Option

WithWriterSpanId writer spanId function

func WithWriterTraceId

func WithWriterTraceId() Option

WithWriterTraceId writer traceId function

type RequestLabelMappingFn

type RequestLabelMappingFn func(c *gin.Context) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL