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

Docs for /metrics endpoint #2024

wants to merge 1 commit into from

Conversation

codebien
Copy link
Contributor

@codebien codebien commented Aug 8, 2025

What?

It adds documentation for the new endpoint /metrics added when the option --profiling-enabled. The pull request with the implementation grafana/k6#4944.

Checklist

  • I have used a meaningful title for the PR.
  • I have described the changes I've made in the "What?" section above.
  • I have performed a self-review of my changes.
  • I have run the npm start command locally and verified that the changes look good.
  • I have made my changes in the docs/sources/k6/next folder of the documentation.

Related PR(s)/Issue(s)

@codebien codebien self-assigned this Aug 8, 2025
* [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.

@codebien codebien marked this pull request as ready for review August 8, 2025 14:23
@codebien codebien requested review from heitortsergent and a team as code owners August 8, 2025 14:23
@codebien codebien requested review from oleiade, ankur22 and mstoykov and removed request for a team, oleiade and ankur22 August 8, 2025 14:23
@mstoykov mstoykov mentioned this pull request Aug 11, 2025
35 tasks
* [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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants