Skip to content

Commit

Permalink
Improve wording in docs / examples (#3200)
Browse files Browse the repository at this point in the history
* Improve wording, fix typos

* Generate reference help

* Apply suggestions from code review

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>

---------

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
  • Loading branch information
aleks-p and knylander-grafana authored Apr 12, 2024
1 parent b7ed17d commit 83de13f
Show file tree
Hide file tree
Showing 53 changed files with 185 additions and 185 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ For more documentation on how to add the Pyroscope agent to your code, see the [
</tr>
<tr>
<td align="center"><a href="https://grafana.com/docs/pyroscope/latest/configure-client/language-sdks/nodejs/"><img src="https://user-images.githubusercontent.com/23323466/178160551-a79ee6ff-a5d6-419e-89e6-39047cb08126.png" width="100px;" alt=""/><br />
<b>NodeJS</b></a><br />
<b>Node.js</b></a><br />
<a href="https://grafana.com/docs/pyroscope/latest/configure-client/language-sdks/nodejs/" title="Documentation">Documentation</a><br />
<a href="https://github.com/grafana/pyroscope/tree/main/examples/language-sdk-instrumentation/nodejs/express" title="examples">Examples</a>
</td>
Expand Down Expand Up @@ -136,11 +136,11 @@ Pyroscope is possible thanks to the excellent work of many people, including but

* Brendan Gregg — inventor of Flame Graphs
* Julia Evans — creator of rbspy — sampling profiler for Ruby
* Vladimir Agafonkin — creator of flamebearer — fast flamegraph renderer
* Vladimir Agafonkin — creator of flamebearer — fast flame graph renderer
* Ben Frederickson — creator of py-spy — sampling profiler for Python
* Adam Saponara — creator of phpspy — sampling profiler for PHP
* Alexei Starovoitov, Brendan Gregg, and many others who made BPF based profiling in Linux kernel possible
* Jamie Wong — creator of speedscope — interactive flamegraph visualizer
* Jamie Wong — creator of speedscope — interactive flame graph visualizer

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions cmd/pyroscope/help-all.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,9 @@ Usage of ./pyroscope:
-querier.max-concurrent int
The maximum number of concurrent queries allowed. (default 4)
-querier.max-flamegraph-nodes-default int
Maximum number of flamegraph nodes by default. 0 to disable. (default 8192)
Maximum number of flame graph nodes by default. 0 to disable. (default 8192)
-querier.max-flamegraph-nodes-max int
Maximum number of flamegraph nodes allowed. 0 to disable.
Maximum number of flame graph nodes allowed. 0 to disable.
-querier.max-query-length duration
The limit to length of queries. 0 to disable. (default 1d)
-querier.max-query-lookback duration
Expand Down
4 changes: 2 additions & 2 deletions cmd/pyroscope/help.txt.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ Usage of ./pyroscope:
-querier.health-check-timeout duration
Timeout for ingester client healthcheck RPCs. (default 5s)
-querier.max-flamegraph-nodes-default int
Maximum number of flamegraph nodes by default. 0 to disable. (default 8192)
Maximum number of flame graph nodes by default. 0 to disable. (default 8192)
-querier.max-flamegraph-nodes-max int
Maximum number of flamegraph nodes allowed. 0 to disable.
Maximum number of flame graph nodes allowed. 0 to disable.
-querier.max-query-length duration
The limit to length of queries. 0 to disable. (default 1d)
-querier.max-query-lookback duration
Expand Down
8 changes: 4 additions & 4 deletions docs/internal/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ To release a new version of the project you need to follow the following steps:
>
> ⚠️ Incorrect: `release/v1.3.0`
The CI will automatically handle the build and create a draft github release.
The CI will automatically handle the build and create a draft GitHub release.

Once ready, you can edit and publish the draft release on Github. You will need to take the release notes and append them to the `CHANGELOG.md` file in the root of the repository.
Once ready, you can edit and publish the draft release on GitHub. You will need to take the release notes and append them to the `CHANGELOG.md` file in the root of the repository.

The list of changes from the CHANGELOG.md file form the basis of the public-facing release notes. Release notes are added to the [public Pyroscope documentation](https://grafana.com/docs/pyroscope/latest/release-notes/). These release notes follow the same pattern for each release:

Expand Down Expand Up @@ -50,7 +50,7 @@ To create a new release first prepare the release using:
make release/prepare
```

This will build and packages all artifacts without pushing or creating the github release.
This will build and packages all artifacts without pushing or creating the GitHub release.

Once you're ready you can then tag your release.

Expand All @@ -64,6 +64,6 @@ And finally push the release using:
make release
```

> Make sure to have a [Github Token](https://goreleaser.com/scm/github/?h=github#github) `GITHUB_TOKEN` correctly set.
> Make sure to have a [GitHub Token](https://goreleaser.com/scm/github/?h=github#github) `GITHUB_TOKEN` correctly set.
Make sure to create the release notes and CHANGELOG for any manual release.
6 changes: 3 additions & 3 deletions docs/internal/contributing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To build:
make go/bin
```

To run the unit tests suite:
To run the unit test suite:

```
make go/test
Expand Down Expand Up @@ -124,7 +124,7 @@ will be able to interact with it.
### Dependency management

We use [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages.
However we don't commit the `vendor/` folder.
However, we don't commit the `vendor/` folder.

To add or update a new dependency, use the `go get` command:

Expand All @@ -150,4 +150,4 @@ The Grafana Pyroscope documentation is compiled into a website published at [gra

To start the website locally you can use `make docs/docs` and follow console instructions to access the website.

Note: if you attempt to view pages on Github, it's likely that you might find broken links or pages. That is expected and should not be addressed unless it is causing issues with the site that occur as part of the build.
Note: if you attempt to view pages on GitHub, it's likely that you might find broken links or pages. That is expected and should not be addressed unless it is causing issues with the site that occur as part of the build.
2 changes: 1 addition & 1 deletion docs/sources/configure-client/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ To get started, choose one of the integrations below:
<a href="https://github.com/grafana/pyroscope/tree/main/examples/language-sdk-instrumentation/ruby" title="ruby-examples">Examples</a>
</td>
<td align="center"><a href="https://grafana.com/docs/pyroscope/latest/configure-client/language-sdks/nodejs/"><img src="https://user-images.githubusercontent.com/23323466/178160551-a79ee6ff-a5d6-419e-89e6-39047cb08126.png" width="100px;" alt=""/><br />
<b>NodeJS</b></a><br />
<b>Node.js</b></a><br />
<a href="https://grafana.com/docs/pyroscope/latest/configure-client/language-sdks/nodejs/" title="Documentation">Documentation</a><br />
<a href="https://github.com/grafana/pyroscope/tree/main/examples/language-sdk-instrumentation/nodejs/express" title="examples">Examples</a>
</td>
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/configure-client/aws-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ For more details, refer to the [Building Extensions for AWS Lambda blog post](ht

## Set up the Pyroscope Lambda extension

To set up the Pyroscope Lamnda extension, you need to:
To set up the Pyroscope Lambda extension, you need to:

1. Configure your Lamda function
1. Configure your Lambda function
1. Set up your environment variables
1. Integrate the Pyroscope SDK

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ The `pyroscope.ebpf` component exposes the following Prometheus metrics:

Check out the following resources to learn more about eBPF profiling:

- [The pros and cons of eBPF profiling](https://pyroscope.io/blog/ebpf-profiling-pros-cons) blog post (for more context on flamegraphs below)
- [The pros and cons of eBPF profiling](https://pyroscope.io/blog/ebpf-profiling-pros-cons) blog post (for more context on flame graphs below)
- [Demo](https://play-pyroscope.grafana.org) showing breakdown of our examples cluster
- Grafana Agent documentation for [pyroscope.ebpf](/docs/agent/latest/flow/reference/components/pyroscope.ebpf/), [pyroscope.write](/docs/agent/latest/flow/reference/components/pyroscope.write/), [discovery.kubernetes](/docs/agent/latest/flow/reference/components/discovery.kubernetes/), [discovery.relabel](/docs/agent/latest/flow/reference/components/discovery.relabel/) components
2 changes: 1 addition & 1 deletion docs/sources/configure-client/grafana-agent/sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ weight: 30

Applications often have many instances deployed. While Pyroscope is designed to handle large amounts of profiling data, you may want only a subset of the application's instances to be scraped.

For example, the volume of profiling data your application generates may make it unreasonable to profile every instance or you might be targeting cost-reduction.
For example, the volume of profiling data your application generates may make it unreasonable to profile every instance, or you might be targeting cost-reduction.

Through configuration of the Grafana Agent, Pyroscope can sample scrape targets.

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The following languages SDKs provide support for sending profiles from your appl
</tr>
<tr>
<td align="center"><a href="./nodejs"><img src="https://user-images.githubusercontent.com/23323466/178160551-a79ee6ff-a5d6-419e-89e6-39047cb08126.png" width="100px;" alt=""/><br />
<b>NodeJS</b></a><br />
<b>Node.js</b></a><br />
<a href="./nodejs" title="Documentation">Documentation</a><br />
<a href="https://github.com/grafana/pyroscope/tree/main/examples/language-sdk-instrumentation/nodejs/express" title="examples">Examples</a>
</td>
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/configure-client/language-sdks/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Our .NET profiler works with the following .NET versions:

## Before you begin

To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pryoscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).
To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pyroscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).

The Pyroscope server can be a local server for development or a remote server for production use.

Expand Down Expand Up @@ -143,7 +143,7 @@ It is possible to dynamically change authorization credentials:
Pyroscope.Profiler.Instance.SetBasicAuth(basicAuthUser, BasicAuthPassword);
```

Here is a simple [example](https://github.com/grafana/pyroscope/blob/main/examples/language-sdk-instrumentation/dotnet/rideshare/example/Program.cs) exposing this APIs as an http endpoint.
Here is a simple [example](https://github.com/grafana/pyroscope/blob/main/examples/language-sdk-instrumentation/dotnet/rideshare/example/Program.cs) exposing these APIs as HTTP endpoints.

### Configuration options

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/go_push.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pprof.Do(context.Background(), pprof.Labels("controller", "slow_controller"), fu

### Mutex profiling

Mutex profiling is useful for finding sources of contention within your application. It helps you to find out which mutexes are being held by which goroutines.
Mutex profiling is useful for finding sources of contention within your application. It helps you find out which mutexes are being held by which goroutines.

To enable mutex profiling, you need to add the following code to your application:

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The latest release is also available on [Maven Central](https://search.maven.org

## Configure the Java client

You can start Pyroscope either from your apps's Java code or attach it as javaagent.
You can start Pyroscope either from your application's code or attach it as javaagent.

### Start Pyroscope from app's Java code

Expand Down
20 changes: 10 additions & 10 deletions docs/sources/configure-client/language-sdks/nodejs.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
---
title: "NodeJS"
menuTitle: "NodeJS"
description: "Instrumenting nodeJS applications for continuous profiling."
title: "Node.js"
menuTitle: "Node.js"
description: "Instrumenting Node.js applications for continuous profiling."
weight: 80
aliases:
- /docs/phlare/latest/configure-client/language-sdks/nodejs
---

# NodeJS
# Node.js

Enhance your Node.js application's performance with our Node.js Profiler. Seamlessly integrated with Pyroscope, it provides real-time insights into your application’s operation, helping you identify and resolve performance bottlenecks. This integration is key for Node.js developers aiming to boost efficiency, reduce latency, and maintain optimal application performance.

## Before you begin

To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pryoscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).
To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pyroscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).

The Pyroscope server can be a local server for development or a remote server for production use.

## Add NodeJS profiling to your application
## Add Node.js profiling to your application

To start profiling a NodeJS application, you need to include the npm module in your app:
To start profiling a Node.js application, you need to include the npm module in your app:

```
npm install @pyroscope/nodejs
Expand All @@ -28,7 +28,7 @@ npm install @pyroscope/nodejs
yarn add @pyroscope/nodejs
```

## Configure the NodeJS client
## Configure the Node.js client

Add the following code to your application:

Expand All @@ -45,7 +45,7 @@ Pyroscope.start()

Note: If you'd prefer to use Pull mode you can do so using the [Grafana Agent]({{< relref "../grafana-agent" >}}).

### Add profiling labels to NodeJS applications
### Add profiling labels to Node.js applications

It is possible to add tags (labels) to the profiling data. These tags can be used to filter the data in the UI. Dynamic tagging isn't supported yet.

Expand Down Expand Up @@ -79,7 +79,7 @@ Pyroscope.init({
Pyroscope.start()
```

To configure the NodeJS SDK to send data to Pyroscope, replace the `serverAddress` placeholder with the appropriate server URL. This could be the Grafana Cloud Pyroscope URL or your own custom Pyroscope server URL.
To configure the Node.js SDK to send data to Pyroscope, replace the `serverAddress` placeholder with the appropriate server URL. This could be the Grafana Cloud Pyroscope URL or your own custom Pyroscope server URL.

If you need to send data to Grafana Cloud, you’ll have to configure HTTP Basic authentication. Replace `basicAuthUser` with your Grafana Cloud stack user ID and `basicAuthPassword` with your Grafana Cloud API key.

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Our Python Profiler, when integrated with Pyroscope, transforms the way you anal

## Before you begin

To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pryoscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).
To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pyroscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).

The Pyroscope server can be a local server for development or a remote server for production use.

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/configure-client/language-sdks/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Ruby Profiler revolutionizes performance tuning in Ruby applications. Integr

## Before you begin

To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pryoscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).
To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pyroscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).

The Pyroscope server can be a local server for development or a remote server for production use.

Expand Down
8 changes: 4 additions & 4 deletions docs/sources/configure-client/language-sdks/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Optimize your Rust applications with our advanced Rust Profiler. In collaboratio

## Before you begin

To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pryoscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).
To capture and analyze profiling data, you need either a hosted Pyroscope OSS server or a hosted [Pyroscope instance with Grafana Cloud Profiles](/products/cloud/profiles-for-continuous-profiling/) (requires a free Grafana Cloud account).

The Pyroscope server can be a local server for development or a remote server for production use.

Expand Down Expand Up @@ -73,7 +73,7 @@ The agent can be stopped at any point, and it'll send a last report to the serve
let agent_ready = agent.stop().unwrap();
```

It's recommended to shutdown the agent before exiting the application. A last
It's recommended to shut down the agent before exiting the application. A last
request to the server might be missed if the agent is not shutdown properly.

```rust
Expand Down Expand Up @@ -142,10 +142,10 @@ PyroscopeAgent::builder("http://localhost:4040", "myapp")
- **Backend**: The Pyroscope Agent uses [pprof-rs](https://github.com/tikv/pprof-rs) as a backend. As a result, the [limitations](https://github.com/tikv/pprof-rs#why-not-) for pprof-rs also applies.
As of 0.5.0, the Pyroscope Agent supports tagging within threads. Check the [tags](https://github.com/pyroscope-io/pyroscope-rs/blob/main/examples/tags.rs) and [multi-thread](https://github.com/pyroscope-io/pyroscope-rs/blob/main/examples/multi-thread.rs) examples for usage.
- **Timer**: epoll (for Linux) and kqueue (for macOS) are required for a more precise timer.
- **Shutdown**: The Pyroscope Agent might take some time (usually less than 10 seconds) to shutdown properly and drop its threads. For a proper shutdown, it's recommended that you run the `shutdown` function before dropping the agent.
- **Shutdown**: The Pyroscope Agent might take some time (usually less than 10 seconds) to shut down properly and drop its threads. For a proper shutdown, it's recommended that you run the `shutdown` function before dropping the agent.

- **Relevant Links**
- [Github Repository](https://github.com/pyroscope-io/pyroscope-rs)
- [GitHub Repository](https://github.com/pyroscope-io/pyroscope-rs)
- [Cargo crate](https://crates.io/crates/pyroscope)
- [Crate documentation](https://docs.rs/pyroscope/latest/pyroscope/index.html)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To use Span Profiles, you need to:

Your applications must be instrumented for profiling and tracing before you can use span profiles.

* Profiling: Your application must be instrumented with Pyroscopes Go SDK. If you haven't done this yet, please refer to the [Go (push mode)]({{< relref "../language-sdks/go_push" >}}) guide.
* Profiling: Your application must be instrumented with Pyroscope's Go SDK. If you haven't done this yet, please refer to the [Go (push mode)]({{< relref "../language-sdks/go_push" >}}) guide.
* Tracing: Your application must be instrumented with OpenTelemetry traces. If you haven't done this yet, please refer to the [OpenTelemetry](https://opentelemetry.io/docs/go/getting-started/) guide.

### OpenTelemetry support
Expand Down Expand Up @@ -103,11 +103,11 @@ Check out the [examples](https://github.com/grafana/pyroscope/tree/main/examples

<!-- ## Using tracing exemplars manually
If you're not using open telemetry integration you can still use exemplars storage to store profiles associated with some execution context (e.g individual HTTP / GRPC request). To create exemplars you need to tag specific parts of your code with a special `profile_id` tag, for example, in golang you could do this:
If you're not using open telemetry integration you can still use exemplars storage to store profiles associated with some execution context (e.g. individual HTTP / GRPC request). To create exemplars you need to tag specific parts of your code with a special `profile_id` tag, for example, in golang you could do this:
```golang
pprof.Do(ctx, pprof.Labels("profile_id", "8474e98b95013e4f"), func(ctx context.Context) {
slowRequest()
})
```
`"8474e98b95013e4f"` can be any ID that you use to identify execution contexts (individual HTTP / GRPC requests). -->
`"8474e98b95013e4f"` can be any ID that you use to identify execution contexts (individual HTTP / GRPC requests). -->
Loading

0 comments on commit 83de13f

Please sign in to comment.