Skip to content

Commit

Permalink
V1 docs audit (grafana#2305)
Browse files Browse the repository at this point in the history
* Fix wording for Kubernetes and Helm installation

* Use 'Ruby' not 'ruby'

* Use 'Ruby' not 'ruby'

* Use 'GitHub' not 'github'

* Lowercase 'flow'

* Add missing period

* Add missing space

* Remove extra space

* Code format .symtab, .dynsym, and .gopclntab

* Fix spelling and capitalization errors

* Capitalize 'SDK'

* Fix capitalization

* Reflow sentence

* Clarify sentence

* Formatting changes

* Reflow sentence

* Correct capitalization

* Reflow sentence

* Fix formatting

* Remove extra header

* Formatting and typo fixes

* Reflow sentence

* Reflow sentence

* Capitalize Pyroscope

* Reflow sentence

* Use 4 spaces in examples for better copy/paste

* Reflow sentences and fix capitalization

* Formatting and flow fixes

* Capitalization and formatting fixes

* Reflow sentence and fix code formatting

* Make tags and multi-thread consistent

* Formatting changes

* Add whitespace

* Add period

* Fix capitalization

* Reflow sentence

* Add missing period

* Fix broken link

* Reflow sentences

* Reflow sentences

* Reflow sentences

* Reflow sentence

* Reflow sentence

* Reflow sentence

* Add missing link

* Fix yaml formatting

* Replace GCS with Azure Blob Storage

* Reflow sentence

* Reflow sentence

* Correct grammar

* Reduce to 1 paragraph

* Simplify list

* Reduce paragraphs

* Remove unnencessary default port remark

* Clarify note

* Remove grafana.com link

* Use 'database' instead of 'db'

* Correct punctuation

* Add ULID link

* Add punctuation
  • Loading branch information
bryanhuhta authored Aug 25, 2023
1 parent 3c0e8a8 commit e40d9df
Show file tree
Hide file tree
Showing 20 changed files with 161 additions and 168 deletions.
4 changes: 2 additions & 2 deletions docs/sources/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Grafana Pyroscope is fully integrated with Grafana allowing you to **correlate**
Core features of Grafana Pyroscope include:

- **Easy to install:** Using its monolithic mode, you can get Grafana Pyroscope up and
running with just one binary and no additional dependencies. On Kubernetes a single helm chart
allows to deploy in different mode.
running with just one binary and no additional dependencies. On Kubernetes, a single helm chart
allows for deploying in different modes.
- **Horizontal scalability:** You can run Grafana Pyroscope
across multiple machines, which makes it effortless for you to scale the database to handle the profiling volumes your workload generates.
- **High availability:** Grafana Pyroscope replicates incoming profiles, ensuring that
Expand Down
5 changes: 2 additions & 3 deletions docs/sources/configure-client/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Using the Grafana agent provides a hassle-free option, especially when dealing w

Alternatively, Pyroscope SDKs offer you the ability to instrument your application directly for more precise profiling. This mode is suitable when you wish to have complete control over the profiling process or when the application you are profiling is written in a language supported by the SDKs (e.g. Java, Python, .NET, etc.). Here's how to use Pyroscope SDKs:

1. Install the relevant Pyroscope SDK for your application's programming language (e.g. pip package, npm package, ruby gem, etc.)
1. Install the relevant Pyroscope SDK for your application's programming language (e.g. pip package, npm package, Ruby gem, etc.)
2. Instrument your application's code using the SDK to capture the necessary profiling data
3. SDK will automatically periodically push the captured profiles to the Pyroscope server for storage and analysis

Expand Down Expand Up @@ -96,5 +96,4 @@ To get started choose one of the integrations below:
</table>


If you have more questions feel free to reach out in our Slack channel or create an issue on github and the Pyroscope team will help!

If you have more questions feel free to reach out in our Slack channel or create an issue on GitHub and the Pyroscope team will help!
6 changes: 3 additions & 3 deletions docs/sources/configure-client/grafana-agent/ebpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ with a `.gnu_debuglink` set to `libc.so.6.debug` and a build ID `0123456789abcde

### Dealing with unknown symbols

Unknown symbols in the profiles you’ve collected indicate that the profiler couldn't access an ELF file associated with a given address in the trace.
Unknown symbols in the profiles you’ve collected indicate that the profiler couldn't access an ELF file associated with a given address in the trace.

This can occur for several reasons:

Expand All @@ -209,7 +209,7 @@ indicates that the symbols couldn't be mapped to their respective function names

This can occur for several reasons:

- The binary has been stripped, leaving no .symtab, .dynsym, or .gopclntab sections in the ELF file.
- The binary has been stripped, leaving no `.symtab`, `.dynsym`, or `.gopclntab` sections in the ELF file.
- The debug file is missing or could not be located.

To fix this for your binaries, ensure that they are either not stripped or that you have separate
Expand Down Expand Up @@ -247,4 +247,4 @@ Interpreted methods will display the interpreter function’s name rather than t
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)
- [Demo](https://demo.pyroscope.io/?query=rideshare-cluster-ebpf.cpu%7B%7D) showing breakdown of our examples cluster
- Grafana agent documnetation for [pyroscope.ebpf](/docs/agent/next/flow/reference/components/pyroscope.ebpf/), [pyroscope.write](/docs/agent/next/flow/reference/components/pyroscope.write/), [discovery.kubernetes](/docs/agent/next/flow/reference/components/discovery.kubernetes/), [discovery.relabel](/docs/agent/next/flow/reference/components/discovery.relabel/) components
- Grafana Agent documentation for [pyroscope.ebpf](/docs/agent/next/flow/reference/components/pyroscope.ebpf/), [pyroscope.write](/docs/agent/next/flow/reference/components/pyroscope.write/), [discovery.kubernetes](/docs/agent/next/flow/reference/components/discovery.kubernetes/), [discovery.relabel](/docs/agent/next/flow/reference/components/discovery.relabel/) components
10 changes: 5 additions & 5 deletions docs/sources/configure-client/grafana-agent/go_pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To be able to pull profiles from applications, your applications needs to expose
Before proceeding with the configuration, ensure that you have the following:

1. Install Grafana Agent in [flow mode](/docs/agent/next/flow/setup/install/)
2. Configure Grafana Agent in Flow mode
2. Configure Grafana Agent in flow mode
3. Start the Grafana Agent

## Adding Profiling to the Grafana Agent
Expand All @@ -33,7 +33,7 @@ In [`/agent/config/config.river`](https://github.com/grafana/pyroscope/blob/main
![Grafana agent go pull diagram](/media/docs/pyroscope/grafana_agent_pull_mode_diagram.png)

1. `pyroscope.write` to configure the receivers to which the profiles are forwarded.
2. `pyroscope.scrape` to establish a pprof scraping job for specific targets. The performance profiles obtained from the scraping process are then passed to the receivers specified in `forward_to`. You can define multiple `pyroscope.scrape` components, each distinguished by unique labels.
2. `pyroscope.scrape` to establish a pprof scraping job for specific targets. The performance profiles obtained from the scraping process are then passed to the receivers specified in `forward_to`. You can define multiple `pyroscope.scrape` components, each distinguished by unique labels.

Here is the general usage:

Expand Down Expand Up @@ -178,9 +178,9 @@ Create the following directory structure:

We will use the following `config.river` file to configure the Grafana Agent to scrape profiles from the application and send them to the Pyroscope server. Be sure to replace the `url` property with the correct Pyroscope instance.

**Note: We have swapped out the standard pprof `block`, `mutex` and `memory` profiles with the more efficient [godeltaprof package](https://github.com/grafana/godeltaprof) which produces `godeltaprof_block`, `godeltaprof_mutex` and `godeltaprof_memory`respectively**
**Note: We have swapped out the standard pprof `block`, `mutex` and `memory` profiles with the more efficient [godeltaprof package](https://github.com/grafana/godeltaprof) which produces `godeltaprof_block`, `godeltaprof_mutex` and `godeltaprof_memory`respectively**.

The reason for using this special package is because godeltaprof is a memory profiler specialized for collecting cumulative profiles(heap, block, mutex) efficiently. It is more efficient because it does the delta/merging before producing pprof data, avoiding extra decompression/parsing/allocations/compression.
The reason for using this special package is because godeltaprof is a memory profiler specialized for collecting cumulative profiles (heap, block, mutex) efficiently. It is more efficient because it does the delta/merging before producing pprof data, avoiding extra decompression/parsing/allocations/compression.

To start using godeltaprof in pull mode in a Go application, you need to include godeltaprof module in your app:

Expand Down Expand Up @@ -252,4 +252,4 @@ By adjusting the configuration as demonstrated above, you can enable the Grafana

## Resources

Visit the [Pyroscope examples](https://github.com/grafana/pyroscope/tree/main/examples/grafana-agent) to see an example of how to run Pyroscope with the Grafana Agent.
Visit the [Pyroscope examples](https://github.com/grafana/pyroscope/tree/main/examples/grafana-agent) to see an example of how to run Pyroscope with the Grafana Agent.
18 changes: 7 additions & 11 deletions docs/sources/configure-client/language-sdks/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ LD_PRELOAD=Pyroscope.Linux.ApiWrapper.x64.so

## Managed helper

With a managed helper you can interact with pyroscope profiler from .Net.
With a managed helper you can interact with the Pyroscope profiler from .NET.

First, add dependency:
First, add the Pyroscope dependency:

```shell
dotnet add package Pyroscope
Expand All @@ -40,7 +40,7 @@ dotnet add package Pyroscope

It is possible to add labels to the profiling data. These labels can be used to filter the data in the UI.

Create a LabelSet and wrap a piece of code with `Pyroscope.LabelsWrapper`.
Create a `LabelSet` and wrap a piece of code with `Pyroscope.LabelsWrapper`.

```cs
var labels = Pyroscope.LabelSet.Empty.BuildUpon()
Expand Down Expand Up @@ -107,21 +107,19 @@ Here is a simple [example](https://github.com/grafana/pyroscope/blob/main/exampl

## Configuration

## Configuration

| ENVIRONMENT VARIABLE | Type | DESCRIPTION |
|----------------------------------------|--------------|-------------|
| PYROSCOPE_PROFILING_LOG_DIR | String | Sets the directory for .NET Profiler logs. Defaults to /var/log/pyroscope/. |
| PYROSCOPE_LABELS | String | Static labels to apply to an uploaded profile. Must be a list of key:value separated by commas such as: layer:api,team:intake. |
| PYROSCOPE_LABELS | String | Static labels to apply to an uploaded profile. Must be a list of key:value separated by commas such as: layer:api or team:intake. |
| PYROSCOPE_SERVER_ADDRESS | String | Address of the Pyroscope Server |
| PYROSCOPE_PROFILING_ENABLED | Boolean | If set to true, enables the .NET Profiler. Defaults to false. |
| PYROSCOPE_PROFILING_WALLTIME_ENABLED | Boolean | If set to false, disables the Wall time profiling. Defaults to true. |
| PYROSCOPE_PROFILING_CPU_ENABLED | Boolean | If set to false, disables the CPU profiling. Defaults to true. |
| PYROSCOPE_PROFILING_EXCEPTION_ENABLED | Boolean | If set to true, enables the Exceptions profiling. Defaults to false. |
| PYROSCOPE_PROFILING_ALLOCATION_ENABLED | Boolean | If set to true, enables the Allocations profiling. Defaults to false. |
| PYROSCOPE_PROFILING_LOCK_ENABLED | Boolean | If set to true, enables the Lock Contention profiling. Defaults to false. |
| PYROSCOPE_BASIC_AUTH_USER | String | For HTTP Basic Authentication, use this to send profiles to atuhenticated server, for example Grafana Cloud |
| PYROSCOPE_BASIC_AUTH_PASSWORD | String | For HTTP Basic Authentication, use this to send profiles to atuhenticated server, for example Grafana Cloud |
| PYROSCOPE_BASIC_AUTH_USER | String | For HTTP Basic Authentication, use this to send profiles to authenticated server, for example Grafana Cloud |
| PYROSCOPE_BASIC_AUTH_PASSWORD | String | For HTTP Basic Authentication, use this to send profiles to authenticated server, for example Grafana Cloud |
| PYROSCOPE_TENANT_ID | String | Only needed if using multi-tenancy in Pyroscope. |

## Sending data to Pyroscope OSS or Grafana Cloud Profiles with .NET SDK
Expand All @@ -139,10 +137,8 @@ export PYROSCOPE_BASIC_AUTH_PASSWORD=<Password>
export PYROSCOPE_TENANT_ID=<TenantID> # only needed if using multi-tenancy
```

To configure .NET sdk to send data to Grafana Cloud Profiles or Pyroscope, replace the `<URL>` placeholder with the appropriate server URL. This could be the Grafana Cloud URL or your own custom Pyroscope server URL.
To configure the .NET SDK to send data to Grafana Cloud Profiles or Pyroscope, replace the `<URL>` placeholder with the appropriate server URL. This could be the Grafana Cloud 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 `<User>` with your Grafana Cloud stack user and `<Password>` with your Grafan Cloud API key.

If your Pyroscope server has multi-tenancy enabled, you'll need to configure a tenant ID. Replace `<TenantID>` with your Pyroscope tenant ID.


4 changes: 2 additions & 2 deletions docs/sources/configure-client/language-sdks/go_push.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func main() {

// optionally, if authentication is enabled, specify the API key:
// AuthToken: os.Getenv("PYROSCOPE_AUTH_TOKEN"),

// you can provide static tags via a map:
Tags: map[string]string{"hostname": os.Getenv("HOSTNAME")},

Expand Down Expand Up @@ -134,7 +134,7 @@ pyroscope.Start(pyroscope.Config{
})
```

To configure the Golang sdk to send data to Pyroscope, replace the `<URL>` placeholder with the appropriate server URL. This could be the Grafana Cloud URL or your own custom Pyroscope server URL.
To configure the Golang SDK to send data to Pyroscope, replace the `<URL>` placeholder with the appropriate server URL. This could be the Grafana Cloud 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 `<User>` with your Grafana Cloud stack user and `<Password>` with your Grafana Cloud API key.

Expand Down
Loading

0 comments on commit e40d9df

Please sign in to comment.