Skip to content

Commit

Permalink
[release/v1.6] [DOC] Fix broken links (#3442)
Browse files Browse the repository at this point in the history
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and knylander-grafana authored Jul 23, 2024
1 parent 98a1fca commit a926dab
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 45 deletions.
3 changes: 2 additions & 1 deletion docs/sources/configure-client/grafana-agent/ebpf/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ However, eBPF has some limitations that make it unsuitable for certain use cases

{{< docs/shared lookup="agent-deprecation.md" source="alloy" version="next" >}}

The Grafana Agent is a lightweight, all-in-one agent that can collect, transform, and ship observability data. For profiling, the Grafana Agent can be configured to collect eBPF profiles and send them to Pyroscope.
The Grafana Agent is a lightweight, all-in-one agent that can collect, transform, and ship observability data.
For profiling, the Grafana Agent can be configured to collect eBPF profiles and send them to Pyroscope.

This section contains instructions for installing and configuring the Grafana Agent to collect eBPF profiles.
For more information about the Grafana Agent itself, see the [Grafana Agent documentation](/docs/agent/latest/flow/).
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ weight: 30

## Configuration reference

Grafana Agent supports eBPF profiling in [Flow mode](/docs/agent/latest/flow/). The configuration file is written in the [River](/docs/agent/latest/flow/config-language/) language and is composed of components that are used to collect, transform, and send data.
Grafana Agent supports eBPF profiling in [Flow mode](https://grafana.com/docs/agent/latest/flow/).
The configuration file is written in the [River](https://grafana.com/docs/agent/latest/flow/concepts/config-language/) language and is composed of components that are used to collect, transform, and send data.

The `pyroscope.ebpf` component is used to collect application performance profiles via eBPF.

Expand All @@ -17,7 +18,7 @@ The `pyroscope.ebpf` component is used to collect application performance profil
The `pyroscope.ebpf` runs on the host machine and collects stack traces associated with a process running on the current host.

Using the `targets` argument, you can specify which processes and containers to profile on the machine. The `targets` can be from discovery components such as `discovery.process`, `dicovery.kubernetes`, `discovery.docker`, and `discovery.dockerswarm`.
To relabel discovered targets and set your own labels you can use the `discovery.relabel` component. For more information, see [Components](/docs/agent/latest/flow/concepts/components/).
To relabel discovered targets and set your own labels you can use the `discovery.relabel` component. For more information, refer to [Components](/docs/agent/latest/flow/concepts/components/).

The `forward_to` parameter should point to a `pyroscope.write` component to send the collected profiles to your Pyroscope Server or [Grafana Cloud](/products/cloud/).

Expand Down
36 changes: 18 additions & 18 deletions docs/sources/configure-client/grafana-agent/go_pull.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ In pull mode, the collector, whether Grafana Alloy (preferred) or Grafana Agent

To set up Golang profiling in pull mode, you need to:

1. Expose pprof endpoints
2. Install a collector, either Grafana Alloy (preferred) or Grafana Agent (legacy)
3. Prepare the collector's configuration file
4. Start the collector
1. Expose pprof endpoints.
2. Install a collector, either Grafana Alloy (preferred) or Grafana Agent (legacy).
3. Prepare the collector's configuration file.
4. Start the collector.

### Expose pprof endpoints

Expand Down Expand Up @@ -48,7 +48,7 @@ To install Alloy, refer to [Grafana Alloy installation](https://grafana.com/docs

{{< docs/shared lookup="agent-deprecation.md" source="alloy" version="next" >}}

If you are using legacy Grafana Agent Flow, use the [Grafana Agent in Flow mode](/docs/agent/latest/flow/setup/install/) documentation to install.
If you are using legacy Grafana Agent Flow, use the [Grafana Agent in Flow mode](https://grafana.com/docs/agent/latest/flow/get-started/install/) documentation to install.

### Prepare the collector configuration file

Expand All @@ -64,7 +64,7 @@ and `pyroscope.scrape`.
}
```

2. Add `pyroscope.scrape` block.
1. Add `pyroscope.scrape` block.
```river
pyroscope.scrape "scrape_job_name" {
targets = [{"__address__" = "localhost:4040", "service_name" = "example_service"}]
Expand Down Expand Up @@ -107,7 +107,7 @@ and `pyroscope.scrape`.
```

3. Save the changes to the file.
1. Save the changes to the file.

### Start the collector

Expand All @@ -116,14 +116,14 @@ and `pyroscope.scrape`.
docker run -p 4040:4040 grafana/pyroscope
```

2. Start the collector:
1. Start the collector:

* To start Grafana Alloy v1.2: Replace `configuration.alloy` with your configuration file name: <br> `alloy run configuration.alloy`
* To start Grafana Alloy v1.0/1.1: Replace `configuration.alloy` with your configuration file name: <br> `alloy run --stability.level=public-preview configuration.alloy`
The `stability.level` option is required for `pyroscope.scrape` with Alloy v1.0 or v1.1. For more information about `stability.level`, refer to [The run command](https://grafana.com/docs/alloy/latest/reference/cli/run/#permitted-stability-levels) documentation.
* To start Grafana Agent, replace `configuration.river` with your configuration file name: <br> ` grafana-agent-flow run configuration.river`

3. Open a browser to http://localhost:4040. The page should list profiles.
1. Open a browser to http://localhost:4040. The page should list profiles.

## Examples

Expand Down Expand Up @@ -156,7 +156,7 @@ pyroscope.write "write_job_name" {
}
```

2. Drop not running pods, create `namespace`, `pod`, `node` and `container` labels.
1. Drop not running pods, create `namespace`, `pod`, `node` and `container` labels.
Compose `service_name` label based on `namespace` and `container` labels.
Select only services matching regex pattern `(ns1/.*)|(ns2/container-.*0)`.
```river
Expand Down Expand Up @@ -241,17 +241,17 @@ router.PathPrefix("/debug/pprof").Handler(http.DefaultServeMux)
### Grafana Alloy
- [Grafana Alloy](https://grafana.com/docs/alloy/latest/)
- [pyroscope.scrape](/docs/alloy/latest/flow/reference/components/pyroscope.scrape/)
- [pyroscope.write](/docs/alloy/latest/flow/reference/components/pyroscope.write/)
- [discovery.kubernetes](/docs/alloy/latest/flow/reference/components/discovery.kubernetes/)
- [discovery.docker](/docs/alloy/latest/flow/reference/components/discovery.docker/)
- [discovery.relabel](/docs/alloy/latest/flow/reference/components/discovery.relabel/)
- [pyroscope.scrape](https://grafana.com/docs/alloy/latest/reference/components/pyroscope/pyroscope.scrape/)
- [pyroscope.write](https://grafana.com/docs/alloy/latest/reference/components/pyroscope/pyroscope.write/)
- [discovery.kubernetes](https://grafana.com/docs/alloy/latest/reference/components/discovery/discovery.kubernetes/)
- [discovery.docker](/docs/alloy/latest/flow/reference/components/discovery/discovery.docker/)
- [discovery.relabel](/docs/alloy/latest/flow/reference/components/discovery/discovery.relabel/)
### Grafana Agent
- [Example using grafana-agent](https://github.com/grafana/pyroscope/tree/main/examples/grafana-agent-auto-instrumentation).
- [pyroscope.scrape](/docs/agent/latest/flow/reference/components/pyroscope.scrape/)
- [pyroscope.write](/docs/agent/latest/flow/reference/components/pyroscope.write/)
- [discovery.kubernetes](/docs/agent/latest/flow/reference/components/discovery.kubernetes/)
- [discovery.docker](/docs/agent/latest/flow/reference/components/discovery.docker/)
- [pyroscope.write](https://grafana.com/docs/agent/latest/flow/reference/components/pyroscope.write/)
- [discovery.kubernetes](https://grafana.com/docs/agent/latest/flow/reference/components/discovery.kubernetes/)
- [discovery.docker](https://grafana.com/docs/agent/latest/flow/reference/components/discovery.docker/)
- [discovery.relabel](/docs/agent/latest/flow/reference/components/discovery.relabel/)
12 changes: 6 additions & 6 deletions docs/sources/configure-client/grafana-agent/java/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Grafana Alloy and Grafana Agent in [Flow mode](/docs/agent/latest/flow/) support
The collector configuration file is composed of components that are used to collect,
transform, and send data.
Alloy configuration files use the Alloy [configuration syntax](https://grafana.com/docs/alloy/latest/concepts/configuration-syntax/).
Agent Flow files use the [River](/docs/agent/latest/flow/config-language/) language.
Agent Flow files use the [River](https://grafana.com/docs/agent/latest/flow/concepts/config-language/) language.

{{< docs/shared lookup="agent-deprecation.md" source="alloy" version="next" >}}

Expand Down Expand Up @@ -292,11 +292,11 @@ For more information:
### Grafana Alloy

- [Grafana Alloy](https://grafana.com/docs/alloy/latest/)
- [pyroscope.scrape](/docs/alloy/latest/flow/reference/components/pyroscope.scrape/)
- [pyroscope.write](/docs/alloy/latest/flow/reference/components/pyroscope.write/)
- [discovery.kubernetes](/docs/alloy/latest/flow/reference/components/discovery.kubernetes/)
- [discovery.docker](/docs/alloy/latest/flow/reference/components/discovery.docker/)
- [discovery.relabel](/docs/alloy/latest/flow/reference/components/discovery.relabel/)
- [pyroscope.scrape](https://grafana.com/docs/alloy/latest/reference/components/pyroscope/pyroscope.scrape/)
- [pyroscope.write](https://grafana.com/docs/alloy/latest/reference/components/pyroscope/pyroscope.write/)
- [discovery.kubernetes](https://grafana.com/docs/alloy/latest/reference/components/discovery/discovery.kubernetes/)
- [discovery.docker](/docs/alloy/latest/flow/reference/components/discovery/discovery.docker/)
- [discovery.relabel](/docs/alloy/latest/flow/reference/components/discovery/discovery.relabel/)

### Grafana Agent

Expand Down
30 changes: 20 additions & 10 deletions docs/sources/configure-client/grafana-agent/sampling.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,31 @@ Applications often have many instances deployed. While Pyroscope is designed to

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.
Through configuration of Grafana Alloy (preferred) or Grafana Agent (legacy) collectors, Pyroscope can sample scrape targets.

## Prerequisites
{{< docs/shared source="alloy" lookup="agent-deprecation.md" version="next" >}}

Before you begin, make sure you understand how to [configure the Grafana Agent]({{< relref "." >}}) to scrape targets and are familiar with the Grafana Agent [component configuration language](/docs/agent/latest/flow/config-language/components).
## Before you begin

Make sure you understand how to configure the collector to scrape targets and are familiar with the component configuration language.
Alloy configuration files use the Alloy [configuration syntax](https://grafana.com/docs/alloy/latest/concepts/configuration-syntax/).
Agent Flow files use the [River](https://grafana.com/docs/agent/latest/flow/concepts/config-language/) language.

## Configuration

The `hashmod` action and the `modulus` argument are used in conjunction to enable sampling behavior by sharding one or more labels. To read further on these concepts, see [rule block documentation](/docs/agent/latest/flow/reference/components/discovery.relabel#rule-block). In short, `hashmod` will perform an MD5 hash on the source labels and `modulus` will perform a modulus operation on the output.
The `hashmod` action and the `modulus` argument are used in conjunction to enable sampling behavior by sharding one or more labels. To read further on these concepts, refer to [rule block documentation](/docs/agent/latest/flow/reference/components/discovery.relabel#rule-block). In short, `hashmod` performs an MD5 hash on the source labels and `modulus` performs a modulus operation on the output.

The sample size can be modified by changing the value of `modulus` in the `hashmod` action and the `regex` argument in the `keep` action. The `modulus` value defines the number of shards, while the `regex` value will select a subset of the shards.
The sample size can be modified by changing the value of `modulus` in the `hashmod` action and the `regex` argument in the `keep` action.
The `modulus` value defines the number of shards, while the `regex` value selects a subset of the shards.

![Workflow for sampling scrape targets](../sample.svg)

> **Note:**
> Choose your source label(s) for the `hashmod` action carefully. They must uniquely define each scrape target or `hashmod` will not be able to shard the targets uniformly.
{{< admonition type="note" >}}
Choose your source label(s) for the `hashmod` action carefully. They must uniquely define each scrape target or `hashmod` won't be able to shard the targets uniformly.
{{< /admonition >}}

For example, consider an application deployed on Kubernetes with 100 pod replicas, all uniquely identified by the label `pod_hash`. The following configuration is set to sample 15% of the pods:
For example, consider an application deployed on Kubernetes with 100 pod replicas, all uniquely identified by the label `pod_hash`.
The following configuration is set to sample 15% of the pods:

```river
discovery.kubernetes "profile_pods" {
Expand Down Expand Up @@ -59,6 +66,9 @@ discovery.relabel "profile_pods" {

## Considerations

This strategy does not guarantee precise sampling. Due to its reliance on an MD5 hash, there is not a perfectly uniform distribution of scrape targets into shards. Larger numbers of scrape targets will yield increasingly accurate sampling.
This strategy doesn't guarantee precise sampling.
Due to its reliance on an MD5 hash, there isn't a perfectly uniform distribution of scrape targets into shards.
Larger numbers of scrape targets yield increasingly accurate sampling.

Keep in mind, if the label being hashed is deterministic, you will see deterministic sharding and thereby deterministic sampling of scrape targets. Similarly, if the label being hashed is non-deterministic, you will see scrape targets being sampled in a non-deterministic fashion.
Keep in mind, if the label hashed is deterministic, you see deterministic sharding and thereby deterministic sampling of scrape targets.
Similarly, if the label hashed is non-deterministic, you see scrape targets sampled in a non-deterministic fashion.
4 changes: 3 additions & 1 deletion docs/sources/configure-client/trace-span-profiles/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Key benefits and features:
- Seamless integration: Smoothly transition from a high-level trace overview to detailed profiling of specific trace spans within Grafana’s trace view
- Efficiency and cost savings: Quickly identify and address performance issues, reducing troubleshooting time and operational costs

Get started:
## Get started

Select an option from the list below:

- Configure Pyroscope: Begin sending profiling data to unlock the full potential of Span Profiles
- Client-side packages: Easily link traces and profiles using available packages for Go, Java, Ruby, .NET, and Python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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 Pyroscope's .NET instrumentation library. Refer to the [.NET]({{< relref "../language-sdks/dotnet" >}}) guide for instructions.
* Tracing: Your application must be instrumented with OpenTelemetry traces. Refer to the [OpenTelemetry](https://opentelemetry.io/docs/languages/net/getting-started/) guide for isntructions.
* Tracing: Your application must be instrumented with OpenTelemetry traces. Refer to the [OpenTelemetry](https://opentelemetry.io/docs/languages/net/getting-started/) guide for instructions.

{{< admonition type="note" >}}
Span profiles in .NET are only supported using [OpenTelemetry manual instrumentation](https://opentelemetry.io/docs/languages/net/instrumentation/)
Expand Down Expand Up @@ -72,7 +72,7 @@ With the span processor registered, spans created automatically (for example, HT

To view the span profiles in Grafana Tempo, you need to have a Grafana instance running and a data source configured to link traces and profiles.

Refer to the [data source configuration documentation](/docs/grafana/datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link traces with profiles.
Refer to the [data source configuration documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link traces with profiles.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ENV OTEL_PYROSCOPE_START_PROFILING=true
## Useful for debugging
# ENV PYROSCOPE_LOG_LEVEL=debug

## Those environment variables need to be overwritten at runtime, if you are using Grafana Cloud
## Those environment variables need to be overwritten at runtime, if you are using Grafana Cloud
ENV PYROSCOPE_SERVER_ADDRESS=http://localhost:4040
# ENV PYROSCOPE_BASIC_AUTH_USER=123 ## Grafana Cloud Username
# ENV PYROSCOPE_BASIC_AUTH_PASSWORD=glc_secret ## Grafana Cloud Password / API Token
Expand All @@ -92,7 +92,7 @@ CMD ["java", "-Dserver.port=5000", "-javaagent:./opentelemetry-javaagent.jar", "

To view the span profiles in Grafana Tempo, you need to have a Grafana instance running and a data source configured to link trace spans and profiles.

Refer to the [data source configuration documentation](https://grafana.com/docs/grafana/latest/datasources/tempo/configure-tempo-data-source/) to see how to configure the visualization to link trace spans with profiles.
Refer to the [data source configuration documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/) to see how to configure the visualization to link trace spans with profiles.

To use a simple configuration, follow these steps:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ With the span processor registered, spans created automatically (for example, HT

To view the span profiles in Grafana Tempo, you need to have a Grafana instance running and a data source configured to link traces and profiles.

Refer to the [data source configuration documentation](/docs/grafana/datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link traces with profiles.
Refer to the [data source configuration documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link traces with profiles.

## Examples

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end

To view the span profiles in Grafana Tempo, you need to have a Grafana instance running and a data source configured to link trace spans and profiles.

Refer to the [data source configuration documentation](/docs/grafana/datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link trace spans with profiles.
Refer to the [data source configuration documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source) to see how to configure the visualization to link trace spans with profiles.

To use a simple configuration, follow these steps:

Expand Down
2 changes: 1 addition & 1 deletion docs/sources/introduction/pyroscope-in-grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ keywords:
Pyroscope can be used alongside the other Grafana tools such as Loki, Tempo, Mimir, and k6.
You can use Pyroscope to get the most granular insight into your application and how you can use it to fix issues that you may have identified via metrics, logs, traces, or anything else.

You can use Pyroscope within Grafana by using the [Pyroscope data source plugin](/docs/grafana/datasources/grafana-pyroscope/).
You can use Pyroscope within Grafana by using the [Pyroscope data source plugin](https://grafana.com/docs/grafana/<GRAFANA_VERSION>datasources/grafana-pyroscope/).
This plugin lets you query Pyroscope data from within Grafana and visualize it alongside your other Grafana data.

## Visualize traces and profiles data
Expand Down

0 comments on commit a926dab

Please sign in to comment.