pprof-web

command module
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

README

PProf-Web

Docker Image CI

PProd web is a web proxy for pprof endpoints. Sometimes we have firewalls between net areas and cannot retch the pprof debug endpoint directly. PProf-Web can be deployed in this area and expose only one web endpoint to proxy the pprof request.

Goals

  • ONLY use official pprof tool as go mod dependency
  • Implement interfaces in official pprof tool as little as possible

Feature

  • Fetch remote CPU profile
  • Load profile from local tmp storage
  • Auto delete inactive profile
  • Better log
  • Dockerfile
  • Helm chart
  • Unit test
  • Support heap profile
  • Support goroutine profile
  • Improve web UI
  • Proxy for all pprof endpoint
  • Support sub folder using -b param

Usage

Nginx proxy as sub folder

Be careful of the proxy_read_timeout option. Because server cannot send any response data during profile, this option must larger than max profile seconds (usually 60s).

location /cluster-1/ {
    rewrite ^/cluster-1(/.*)$ $1 break;
    proxy_redirect / /cluster-1/;
    proxy_read_timeout 120s;
    proxy_pass http://1.1.1.1:8080/;
}

location /cluster-2/ {
    rewrite ^/cluster-2(/.*)$ $1 break;
    proxy_redirect / /cluster-2/;
    proxy_read_timeout 120s;
    proxy_pass http://2.2.2.2:8080/;
}

Stargazers over time

Stargazers over time

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL