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

[docs] Clarify which URL to use with profilecli #3526

Merged
merged 3 commits into from
Aug 29, 2024
Merged
Changes from 1 commit
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
9 changes: 6 additions & 3 deletions docs/sources/view-and-analyze-profile-data/profile-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ export PROFILECLI_PASSWORD=<password>
profilecli <command>
```

{{< admonition type="caution" >}}
If you're querying data from Grafana Cloud Profiles, be sure to use the url of your Grafana Cloud Pyroscope server in `PROFILECLI_URL` (e.g. `https://profiles-prod-001.grafana.net`) and **not** the url of your Grafana Cloud tenant (e.g. `<your tenant>.grafana.net`).
bryanhuhta marked this conversation as resolved.
Show resolved Hide resolved
{{< /admonition >}}

## Uploading a profile to a Pyroscope server using `profilecli`

Expand Down Expand Up @@ -285,8 +288,8 @@ By default, it looks for samples within the last hour, though this can be contro
- You can provide a label selector using the `--query` flag, for example, `--query='{service_name="my_application_name"}'`.
- You can provide a custom time range using the `--from` and `--to` flags, for example, `--from="now-3h" --to="now"`.
- You can specify the profile type via the `--profile-type` flag. The available profile types are listed in the output of the `profilecli query series` command.
- You can specify the number of leaf locations to keep via the `--keep-locations` flag. The default value is `5`. Go compiler does not use the full stack trace. Reducing the number helps to minimize the profile size.
- You can specify whether the callee aggregation should be used via the `--aggregate-callees` flag. By default, samples are aggregated by the leaf location, ignoring callee line number. Go compiler ignores this information.
- You can specify the number of leaf locations to keep via the `--keep-locations` flag. The default value is `5`. Go compiler does not use the full stack trace. Reducing the number helps to minimize the profile size.
bryanhuhta marked this conversation as resolved.
Show resolved Hide resolved
- You can specify whether the callee aggregation should be used via the `--aggregate-callees` flag. By default, samples are aggregated by the leaf location, ignoring callee line number. Go compiler ignores this information.

2. Construct and execute the command.

Expand All @@ -295,7 +298,7 @@ By default, it looks for samples within the last hour, though this can be contro
export PROFILECLI_URL=https://profiles-prod-001.grafana.net
export PROFILECLI_USERNAME=my_username
export PROFILECLI_PASSWORD=my_password

profilecli query go-pgo \
--query='{service_name="my_service"}' \
--from="now-1h" --to="now"
Expand Down
Loading