Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify error output #16

Closed
chinajuanbob opened this issue Jun 23, 2020 · 3 comments · Fixed by #21
Closed

Simplify error output #16

chinajuanbob opened this issue Jun 23, 2020 · 3 comments · Fixed by #21
Labels
enhancement New feature or request

Comments

@chinajuanbob
Copy link

Current:

{"level":"error","ts":1592821617.1456428,"logger":"http.handlers.http_cache","msg":"cache handler","error":"no precollect content"}
goroutine 311 [running]:
runtime/debug.Stack(0x212d112, 0x0, 0x0)
        /usr/local/go/src/runtime/debug/stack.go:24 +0xab
runtime/debug.PrintStack()
        /usr/local/go/src/runtime/debug/stack.go:16 +0x34
github.com/sillygod/cdp-cache.(*Handler).ServeHTTP(0xc0006a3040, 0x7f0c4591de50, 0xc0008a00a0, 0xc0004c9700, 0x3c2e920, 0xc00095a360, 0x0, 0x0)
        /go/pkg/mod/github.com/sillygod/[email protected]/handler.go:328 +0x6f2
github.com/caddyserver/caddy/v2/modules/caddyhttp.wrapMiddleware.func1.1(0x7f0c4591de50, 0xc0008a00a0, 0xc0004c9700, 0xc00095a930, 0x3c2f8e0)
        /go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/routes.go:256 +0x7b
github.com/caddyserver/caddy/v2/modules/caddyhttp.HandlerFunc.ServeHTTP(0xc00095a390, 0x7f0c4591de50, 0xc0008a00a0, 0xc0004c9700, 0x0, 0x0)
        /go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/caddyhttp.go:58 +0x52
github.com/hairyhenderson/caddyprom.Metrics.ServeHTTP.func1(0x7f0c4591de50, 0xc0008a00a0, 0xc0004c9700)
        /go/pkg/mod/github.com/hairyhenderson/[email protected]/caddyprom.go:95 +0x72
net/http.HandlerFunc.ServeHTTP(0xc000520120, 0x7f0c4591de50, 0xc0008a00a0, 0xc0004c9700)
        /usr/local/go/src/net/http/server.go:2012 +0x52
github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerResponseSize.func1(0x7f0c4591de50, 0xc0008a0050, 0xc0004c9700)
        /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/promhttp/instrument_server.go:196 +0x105
net/http.HandlerFunc.ServeHTTP(0xc00095a5a0, 0x7f0c4591de50, 0xc0008a0050, 0xc0004c9700)
        /usr/local/go/src/net/http/server.go:2012 +0x52
github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerDuration.func1(0x7f0c4591de50, 0xc0008a0000, 0xc0004c9700)
        /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/promhttp/instrument_server.go:68 +0x13d
net/http.HandlerFunc.ServeHTTP(0xc00095a750, 0x7f0c4591de50, 0xc0008a0000, 0xc0004c9700)
        /usr/local/go/src/net/http/server.go:2012 +0x52
github.com/prometheus/client_golang/prometheus/promhttp.InstrumentHandlerCounter.func1(0x3c4e040, 0xc0006f6380, 0xc0004c9700)
        /go/pkg/mod/github.com/prometheus/[email protected]/prometheus/promhttp/instrument_server.go:100 +0xf9
net/http.HandlerFunc.ServeHTTP(...)
      ...

Expected:

Output error msg w/o stack for this error

Thanks!

@sillygod
Copy link
Owner

Hi @chinajuanbob ,

I've also removed the debug print stack in the pr: #21 You can check it!

@sillygod sillygod linked a pull request Jun 25, 2020 that will close this issue
@sillygod
Copy link
Owner

sillygod commented Jul 1, 2020

@chinajuanbob , it seems that the error stack didn't appear since the last PR merged and don't receive any feedback again.
Therefore, I will close this issue a few days later if there is no reply.

@sillygod
Copy link
Owner

sillygod commented Jul 3, 2020

There is no reply to this issue so I think it's resolved.

@sillygod sillygod closed this as completed Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants