Change pprof labels to be prometheus compatible (#32865)

Enables scrapping pprof endpoint for continuous profiling

Closes: https://github.com/go-gitea/gitea/issues/32854
This commit is contained in:
TheFox0x7 2024-12-18 04:08:04 +01:00 committed by GitHub
parent 195fccd617
commit b945742293
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 10 deletions

View file

@ -26,7 +26,7 @@ var (
)
// DescriptionPProfLabel is a label set on goroutines that have a process attached
const DescriptionPProfLabel = "process-description"
const DescriptionPProfLabel = "process_description"
// PIDPProfLabel is a label set on goroutines that have a process attached
const PIDPProfLabel = "pid"
@ -35,7 +35,7 @@ const PIDPProfLabel = "pid"
const PPIDPProfLabel = "ppid"
// ProcessTypePProfLabel is a label set on goroutines that have a process attached
const ProcessTypePProfLabel = "process-type"
const ProcessTypePProfLabel = "process_type"
// IDType is a pid type
type IDType string