Documentation ¶
Overview ¶
Package gintrace provides tracing middleware for the Gin web framework.
Index ¶
- func HTML(c *gin.Context, code int, name string, obj interface{})
- func Middleware(service string) gin.HandlerFunc
- func MiddlewareTracer(service string, t *tracer.Tracer) gin.HandlerFunc
- func NewChildSpan(name string, c *gin.Context) *tracer.Span
- func Span(c *gin.Context) (*tracer.Span, bool)
- func SpanDefault(c *gin.Context) *tracer.Span
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTML ¶
HTML will trace the rendering of the template as a child of the span in the given context.
func Middleware ¶
func Middleware(service string) gin.HandlerFunc
Middleware returns middleware that will trace requests with the default tracer.
func MiddlewareTracer ¶
func MiddlewareTracer(service string, t *tracer.Tracer) gin.HandlerFunc
MiddlewareTracer returns middleware that will trace requests with the given tracer.
func NewChildSpan ¶
NewChildSpan will create a span that is the child of the span stored in the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.