Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add auto logging of goroutine pid label #19212

Merged
merged 6 commits into from
Mar 26, 2022

Commits on Mar 25, 2022

  1. Add auto logging of goroutine pid label

    This PR uses unsafe to export the hidden runtime_getProfLabel function from the
    runtime package and then casts the result to a map[string]string.
    
    We can then interrogate this map to get the pid label from the goroutine allowing
    us to log it with any logging request.
    
    Reference go-gitea#19202
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    b819116 View commit details
    Browse the repository at this point in the history
  2. placate lint

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    224bb5b View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2022

  1. as per review

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    88528b7 View commit details
    Browse the repository at this point in the history
  2. adjust to allow nil map

    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    b980223 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ce42e95 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    95f0882 View commit details
    Browse the repository at this point in the history