Skip to content

Docs for /metrics endpoint #2024

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/sources/k6/next/using-k6/k6-options/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,12 @@ export const options = {

## Profiling Enabled

Enables [pprof](https://pkg.go.dev/net/http/pprof) profiling endpoints under the k6's REST API [address](#address). These endpoints help debug and profile k6 itself. k6's REST API should be enabled as well.
Enables profiling endpoints under the [k6 REST API [address](#address) to help debug and profile k6 itself:

* [pprof](https://pkg.go.dev/net/http/pprof) profiling endpoints for CPU and memory profiling
* Prometheus [/metrics](https://prometheus.io/docs/guides/go-application/#how-go-exposition-works) endpoint for exporting Go runtime metrics

The k6 REST API must be enabled for these endpoints to be available (this is the default behavior).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already added before, but I haven't found the documentation about how to disable the API. Do we really support it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can set it to an empty string and it will be disabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try to submit some docs for it as soon as possible tomorrow.


| Env | CLI | Code / Config file | Default |
| ---------------------- | --------------------- | ------------------ | ------------------------------------ |
Expand Down