Documentation
¶
Overview ¶
Package profiling provides opt-in continuous Go profiling through Grafana Pyroscope. Importing this package has no runtime effect until a server address is configured.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StopFunc ¶
type StopFunc func()
StopFunc stops the profiler and flushes its last profile batch. It is safe to call more than once.
func StartFromEnv ¶
StartFromEnv starts profiling for serviceName when PYROSCOPE_SERVER_ADDRESS is configured. The endpoint is required to use HTTPS, except for localhost development. Remote endpoints require separate file-mounted basic-auth credentials. An unset endpoint is a no-op, which keeps the same binary safe to deploy before profiling is enabled centrally.