Skip to content
New issue

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

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

Already on GitHub? # to your account

trace seconds field is not effect #3

Closed
thinkAfCod opened this issue Sep 20, 2022 · 2 comments
Closed

trace seconds field is not effect #3

thinkAfCod opened this issue Sep 20, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@thinkAfCod
Copy link

Below is my code using the fgtrace:

go func() {
    http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
    http.DefaultServeMux.Handle("/debug/fgtrace", fgtrace.Config{})
    logger.Error("pprof server error", "err", http.ListenAndServe("0.0.0.0:1234", nil))
}()

curl get fgtrace file, I specified a trace time of 120s :

curl -o fgtrace.json http://localhost:1234/debug/fgtrace?seconds=120

but it returned the file immediately.So, Is there any configuration I need to modify?

@felixge felixge added the bug Something isn't working label Sep 21, 2022
@felixge
Copy link
Owner

felixge commented Sep 21, 2022

Confirmed this is a bug. I screwed up some stuff while refactoring 🤦. Will fix.

felixge added a commit that referenced this issue Sep 21, 2022
fix: ServeHTTP was broken after refactor
@felixge
Copy link
Owner

felixge commented Sep 21, 2022

Fixed by f46702d - will cut a new release now. Sorry about this.

@felixge felixge closed this as completed Sep 21, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants