echo

package module
v0.0.0-...-8d7de0a Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Namespace: "echo",
	Subsystem: "http",
	Buckets: []float64{
		0.0005,
		0.001,
		0.002,
		0.005,
		0.01,
		0.02,
		0.05,
		0.1,
		0.2,
		0.5,
		1.0,
		2.0,
		5.0,
		10.0,
		15.0,
		20.0,
		30.0,
	},
	NormalizeHTTPStatus: true,
	Domain:              "unk",
	Scope:               "http",
	Version:             "0.0.0.0",
}

DefaultConfig has the default instrumentation config

Functions

func MetricsMiddleware

func MetricsMiddleware() echo.MiddlewareFunc

MetricsMiddleware returns an echo middleware with default config for instrumentation.

func MetricsMiddlewareWithConfig

func MetricsMiddlewareWithConfig(config Config) echo.MiddlewareFunc

MetricsMiddlewareWithConfig returns an echo middleware for instrumentation.

Types

type Config

type Config struct {
	Namespace           string
	Buckets             []float64
	Subsystem           string
	NormalizeHTTPStatus bool
	Version             string
	Scope               string
	Domain              string
}

Config responsible to configure middleware

func NewConfig

func NewConfig() Config

NewConfig returns a new config with default values

Jump to

Keyboard shortcuts

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