tracer

package
v2.3.75 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricNameHttpServerDuration       = "http.server.duration"
	MetricNameHttpServerRequestSize    = "http.server.request.size"
	MetricNameHttpServerResponseSize   = "http.server.response.size"
	MetricNameHttpServerActiveRequests = "http.server.active_requests"

	UnitDimensionless = "1"
	UnitBytes         = "By"
	UnitMilliseconds  = "ms"
)

Variables

This section is empty.

Functions

func HasBasicAuth

func HasBasicAuth(auth string) (string, bool)

func Init

func Init(ctx context.Context, serviceName, endpoint string, attributes ...attribute.KeyValue) (tracer *trace.TracerProvider)

func Middleware

func Middleware(opts ...Option) fiber.Handler

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithCollectClientIP

func WithCollectClientIP(collect bool) Option

func WithCustomAttributes

func WithCustomAttributes(f func(ctx *fiber.Ctx) []attribute.KeyValue) Option

func WithCustomMetricAttributes

func WithCustomMetricAttributes(f func(ctx *fiber.Ctx) []attribute.KeyValue) Option

func WithMeterProvider

func WithMeterProvider(provider otelmetric.MeterProvider) Option

func WithNext

func WithNext(f func(ctx *fiber.Ctx) bool) Option

func WithPort

func WithPort(port int) Option

func WithPropagators

func WithPropagators(propagators propagation.TextMapPropagator) Option

func WithServerName

func WithServerName(serverName string) Option

func WithSpanNameFormatter

func WithSpanNameFormatter(f func(ctx *fiber.Ctx) string) Option

func WithTracerProvider

func WithTracerProvider(provider oteltrace.TracerProvider) Option

Jump to

Keyboard shortcuts

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