iyashjayesh / monigo

MoniGo is a performance monitoring library for Go apps, offering real-time insights into service-level and function-level metrics. With an intuitive UI, it enables developers to track and optimize performance. Get your Go app's dashboard up in just 10 seconds!
https://pkg.go.dev/github.com/iyashjayesh/monigo
Apache License 2.0
240 stars 10 forks source link

fix - name contains an additional path #17

Closed Bionic2113 closed 2 months ago

Bionic2113 commented 2 months ago

I wanted to try out your library. I got an error when I called the TraceFunction function. Inside, it requested a name that contained the path spelled out in the module in go.mod. Therefore, I decided to replace all "/" with "-"

iyashjayesh commented 2 months ago

I wanted to try out your library. I got an error when I called the TraceFunction function. Inside, it requested a name that contained the path spelled out in the module in go.mod. Therefore, I decided to replace all "/" with "-"

@Bionic2113 That seems valid to me, great catch! It would be helpful if you could provide an example — maybe a function name with the full path, both before and after the change.

iyashjayesh commented 2 months ago

@Bionic2113 Once you share an example, I'll merge the PR with #15 and include it in the minor release.

Bionic2113 commented 2 months ago
Снимок экрана 2024-09-21 в 13 14 10

Before:

2024/09/21 13:05:25 could not write memory profile for function: github.com/test/monigo/server.(Server).HomeHandler-fm.(Server).HomeHandler.func1 : Error: open /Users/a1/go/src/test/monigo/monigo/profiles/github.com/test/monigo/server.(Server).HomeHandler-fm.(Server).HomeHandler.func1_mem.prof: no such file or directory will be retrying in the next iteration

After:

Name after: github.com-test-monigo-server.(Server).HomeHandler-fm.(Server).HomeHandler.func1