Martti T.
Martti T.
This should probably be closed. At least I can not recreate it. ```go package main import ( "errors" "github.com/labstack/echo-contrib/echoprometheus" "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" "log" "net/http" ) func main() { e := echo.New()...
I think this was done with https://github.com/labstack/echo-contrib/pull/97
usual Echo middleware conventions could be seen here https://github.com/labstack/echo/blob/f22ba6725c66896efdef029aaeb3bfc471f171c3/middleware/basic_auth.go#L14 ```go type BasicAuthConfig struct { //... } ``` and mw is created from configs as: ```go func BasicAuthWithConfig(config BasicAuthConfig) echo.MiddlewareFunc {...
seems ok. another thing https://github.com/labstack/echo-contrib/blob/b6855c2b7d9745b7db2498623e89cae526b41f57/prometheus/prometheus.go#L399 This method does too much - registering middleware and setting handler should be 2 distinct actions. If I recall correctly Prometheus could PUSH metrics also...
I'll look this evening but I was actually thinking of creating new middleware and mark old one deprecated. I that way whoever implements that new mw can start from clean...
oolright, I think we can and should do even further than tinkering with existing mw. I have created PR for different take what prometheus middleware should be https://github.com/labstack/echo-contrib/pull/94
closing, new middleware was added with #94
closing, new middleware was added with #94 Newer middleware allows user to separate handler function which can be served from different http server. extremely simplistic example: ```go import ( "errors"...
Closing, there is a Echo middleware for OpenTracing https://github.com/opentracing-contrib/echo
closing, old, wrong import used