fibertracing

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Tracer: opentracing.NoopTracer{},
	Modify: func(ctx *fiber.Ctx, span opentracing.Span) {
		span.SetTag("http.method", ctx.Method())
		span.SetTag("http.remote_address", ctx.IP())
		span.SetTag("http.path", ctx.Path())
		span.SetTag("http.host", ctx.Hostname())
		span.SetTag("http.url", ctx.OriginalURL())
	},
	TransactionName: func(ctx *fiber.Ctx) string {
		return fmt.Sprintf(`HTTP %s URL: %s`, ctx.Method(), ctx.Path())
	},
}

Functions

func New

func New(config Config) func(c *fiber.Ctx) error

Types

type Config

type Config struct {
	Tracer          opentracing.Tracer
	TransactionName func(ctx *fiber.Ctx) string
	Filter          func(ctx *fiber.Ctx) bool
	Modify          func(ctx *fiber.Ctx, span opentracing.Span)
}

Jump to

Keyboard shortcuts

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