mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-06 01:37:25 +08:00
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:
@ -32,7 +32,7 @@ func (c *Context) Value(key any) any {
|
||||
}
|
||||
|
||||
// ProcessContextKey is the key under which process contexts are stored
|
||||
var ProcessContextKey any = "process-context"
|
||||
var ProcessContextKey any = "process_context"
|
||||
|
||||
// GetContext will return a process context if one exists
|
||||
func GetContext(ctx context.Context) *Context {
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user