Skip to content

Conversation

@chaudum
Copy link
Contributor

@chaudum chaudum commented Jun 21, 2024

What this PR does / why we need it:

The HTTP endpoints for scraping CPU, mutex and block profiles are already exposed by the server, however, block and mutex profiling must be explicitly enabled by setting a non-zero value for SetBlockProfileRate and SetMutexProfileFraction respectively.

For more information about the available options consult the Go documentation:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
The HTTP endpoints for scraping CPU, mutex and block profiles are
already exposed by the server, however, block and mutex profiling must
be explicitly enabled by setting a non-zero value for
`SetBlockProfileRate` and `SetMutexProfileFraction` respectively.

For more information about the available options consult the Go
documentation:

* https://pkg.go.dev/runtime#SetBlockProfileRate
* https://pkg.go.dev/runtime#SetMutexProfileFraction
* https://pkg.go.dev/runtime#SetCPUProfileRate

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
@chaudum chaudum requested a review from a team as a code owner June 21, 2024 08:44
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Jun 21, 2024
@chaudum chaudum merged commit f06eabb into main Jun 21, 2024
@chaudum chaudum deleted the chaudum/profiling-options branch June 21, 2024 09:56
grafanabot pushed a commit that referenced this pull request Jun 21, 2024
The HTTP endpoints for scraping CPU, mutex and block profiles are already exposed by the server, however, block and mutex profiling must be explicitly enabled by setting a non-zero value for `SetBlockProfileRate` and `SetMutexProfileFraction` respectively.

For more information about the available options consult the Go documentation:

* https://pkg.go.dev/runtime#SetBlockProfileRate
* https://pkg.go.dev/runtime#SetMutexProfileFraction
* https://pkg.go.dev/runtime#SetCPUProfileRate

Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
(cherry picked from commit f06eabb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport k207 size/M type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories

2 participants