chore(e2e): Added build tag for enabling pprof tracing (#5839)

* added pprof tag and make command
* updated tracing readme
This commit is contained in:
dillanb-hashi authored and GitHub committed 2025-06-16 08:19:20 -07:00
1 parent 7040374b6f
commit 828148934b
6 files changed
+54 -16

No files matched your search

+3 -16
View File
@@ -1,23 +1,10 @@
# Tracing in Boundary
Boundary includes a small number of runtime tracing user regions, which can be used to see where Boundary spends its time during execution.
To create a trace, we first need to expose the pprof endpoint. It is disabled by default. Exposing the pprof endpoint is as simple as importing the correct package and starting a HTTP server anywhere in Boundary:
To create a trace, we first need to expose the pprof endpoint. It is disabled by default. Exposing the pprof endpoint is as simple as building with the `pprof` build tag or running
```go
package anything
import (
"log"
"net/http"
_ "net/http/pprof"
)
...
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
...
```
make build-pprof
```
This will create a new HTTP endpoint on `localhost:6060` of the running binary. As such, it's only accessible to the users on the same machine.