Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit 982a19f

Browse files
authored
Reorganize docs structure (#703)
* Reorganize phlare docs
1 parent 06093f8 commit 982a19f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+220
-256
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
aliases:
3+
- /docs/phlare/latest/operators-guide/configure-agent/
4+
title: "Sending profiles from your application"
5+
menuTitle: "Configure the Client"
6+
description: ""
7+
weight: 30
8+
---
9+
10+
# Sending profiles from your application
11+
12+
Phlare is a continuous profiling database that allows you to analyze the performance of your applications. When sending profiles to Phlare, you have two options: using the Grafana agent in pull mode or utilizing the Phlare SDKs in push mode. This document will provide an overview of these two methods and guide you on when to choose each option.
13+
14+
![Phlare agent server diagram](agent-server-diagram.png)
15+
16+
## Grafana Agent (Pull Mode)
17+
18+
The Grafana agent is a component that runs alongside your application and periodically pulls the profiles from it. This mode is suitable when you want to collect profiles from existing applications without modifying their source code. Here's how it works:
19+
20+
1. Install and configure the Grafana agent on the same machine or container where your application is running.
21+
2. The agent will periodically query your application's performance profiling endpoints, such as pprof endpoints in Go applications.
22+
3. The retrieved profiles are then sent to the Phlare server for storage and analysis.
23+
24+
Using the Grafana agent is a convenient option when you have multiple applications or microservices, as you can centralize the profiling process without making any changes to your application's codebase.
25+
26+
## Phlare SDKs (Push Mode)
27+
28+
Alternatively, you can use the Phlare SDKs to push profiles from your application directly to the Phlare server. This mode is suitable when you want to have more control over the profiling process or when the application you are profiling is written in a language supported by the SDKs (e.g., Ruby, Python, etc.). Follow these steps to use the Phlare SDKs:
29+
30+
1. Install the relevant Phlare SDK for your application's programming language (e.g., Ruby gem, pip package, etc.)
31+
2. Instrument your application's code using the SDK to capture the necessary profiling data
32+
3. Periodically push the captured profiles to the Phlare server for storage and analysis
33+
34+
By using the Phlare SDKs, you have the flexibility to customize the profiling process according to your application's specific requirements. You can selectively profile specific sections of code or send profiles at different intervals, depending on your needs.
35+
36+
## Choosing the Grafana agent or Phlare SDK to send profiles
37+
38+
The decision of which mode to use depends on your specific use case and requirements. Here are some factors to consider when making the choice:
39+
40+
- Ease of setup: If you want a quick and straightforward setup without modifying your application's code, the Grafana agent in pull mode is a good choice
41+
- Language support: If your application is written in a language supported by the Phlare SDKs and you want more control over the profiling process, using the SDKs in push mode is recommended
42+
- Flexibility: The Phlare SDKs provide more flexibility in terms of customizing the profiling process and capturing specific sections of code with labels. If you have specific profiling needs or want to fine-tune the data collection process, the SDKs offer greater flexibility
43+
44+
To get started choose one of the integrations below:
45+
<table>
46+
<tr>
47+
<td align="center"><a href="https://pyroscope.io/docs/golang"><img src="https://user-images.githubusercontent.com/23323466/178160549-2d69a325-56ec-4e19-bca7-d460d400b163.png" width="100px;" alt=""/><br />
48+
<b>Golang</b></a><br />
49+
<a href="https://pyroscope.io/docs/golang" title="Documentation">Documentation</a><br />
50+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/golang-push" title="golang-examples">Examples</a>
51+
</td>
52+
<td align="center"><a href="https://pyroscope.io/docs/java"><img src="https://user-images.githubusercontent.com/23323466/178160550-2b5a623a-0f4c-4911-923f-2c825784d45d.png" width="100px;" alt=""/><br />
53+
<b>Java</b></a><br />
54+
<a href="https://pyroscope.io/docs/java" title="Documentation">Documentation</a><br />
55+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/java-jfr/rideshare" title="java-examples">Examples</a>
56+
</td>
57+
<td align="center"><a href="https://pyroscope.io/docs/python"><img src="https://user-images.githubusercontent.com/23323466/178160553-c78b8c15-99b4-43f3-a2a0-252b6c4862b1.png" width="100px;" alt=""/><br />
58+
<b>Python</b></a><br />
59+
<a href="https://pyroscope.io/docs/python" title="Documentation">Documentation</a><br />
60+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/python" title="python-examples">Examples</a>
61+
</td>
62+
<td align="center"><a href="https://pyroscope.io/docs/ruby"><img src="https://user-images.githubusercontent.com/23323466/178160554-b0be2bc5-8574-4881-ac4c-7977c0b2c195.png" width="100px;" alt=""/><br />
63+
<b>Ruby</b></a><br />
64+
<a href="https://pyroscope.io/docs/ruby" title="Documentation">Documentation</a><br />
65+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/ruby" title="ruby-examples">Examples</a>
66+
</td>
67+
<td align="center"><a href="https://pyroscope.io/docs/rust"><img src="https://user-images.githubusercontent.com/23323466/178160555-fb6aeee7-5d31-4bcb-9e3e-41e9f2f7d5b4.png" width="100px;" alt=""/><br />
68+
<b>Rust</b></a><br />
69+
<a href="https://pyroscope.io/docs/rust" title="Documentation">Documentation</a><br />
70+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/rust/rideshare" title="examples">Examples</a>
71+
</td>
72+
</tr>
73+
<tr>
74+
<td align="center"><a href="https://pyroscope.io/docs/nodejs"><img src="https://user-images.githubusercontent.com/23323466/178160551-a79ee6ff-a5d6-419e-89e6-39047cb08126.png" width="100px;" alt=""/><br />
75+
<b>NodeJS</b></a><br />
76+
<a href="https://pyroscope.io/docs/nodejs" title="Documentation">Documentation</a><br />
77+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/nodejs/express" title="examples">Examples</a>
78+
</td>
79+
<td align="center"><a href="https://pyroscope.io/docs/dotnet"><img src="https://user-images.githubusercontent.com/23323466/178160544-d2e189c6-a521-482c-a7dc-5375c1985e24.png" width="100px;" alt=""/><br />
80+
<b>Dotnet</b></a><br />
81+
<a href="https://pyroscope.io/docs/dotnet" title="Documentation">Documentation</a><br />
82+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/dotnet" title="examples">Examples</a>
83+
</td>
84+
<td align="center"><a href="https://pyroscope.io/docs/ebpf"><img src="https://user-images.githubusercontent.com/23323466/178160548-e974c080-808d-4c5d-be9b-c983a319b037.png" width="100px;" alt=""/><br />
85+
<b>eBPF</b></a><br />
86+
<a href="https://pyroscope.io/docs/ebpf" title="Documentation">Documentation</a><br />
87+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/ebpf" title="examples">Examples</a>
88+
</td>
89+
<td align="center"><a href="https://pyroscope.io/docs/php"><img src="https://user-images.githubusercontent.com/23323466/178160552-7aabf63a-b129-404d-8c62-16dedfefe32c.png" width="100px;" alt=""/><br />
90+
<b>PHP</b></a><br />
91+
<a href="https://pyroscope.io/docs/php" title="Documentation">Documentation</a><br />
92+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/php" title="examples">Examples</a>
93+
</td>
94+
</tr>
95+
</table>
96+
97+
98+
If you have more questions feel free to reach out in our Slack channel or create an issue on github and the Phlare team will help!
99+
527 KB
Loading

docs/sources/operators-guide/configure-agent/about-the-agent.md renamed to docs/sources/configure-client/grafana-agent.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: "Grafana Phlare about the agent"
3-
menuTitle: "About the agent"
4-
description: "Learn more about the Phlare agent"
2+
title: "Grafana agent"
3+
menuTitle: "Grafana agent"
4+
description: "Learn more about the Grafana agent"
55
weight: 10
66
---
77

8-
# Grafana Phlare about the agent
8+
# Grafana agent
99

10-
The Grafana Phlare Agent is responsible for pulling profiles from applications and delivering them
10+
The Grafana Agent is responsible for pulling profiles from applications and delivering them
1111
to the Grafana Phlare database.
1212

1313
## Configuring the agent
1414

1515
To be able to pull profiles from applications, your applications needs to expose [pprof endpoints](https://pkg.go.dev/net/http/pprof).
1616

17-
For more information about how to instrument your application with pprof endpoints see the [language support]({{< relref "./language-support/">}}) section.
17+
For more information about how to instrument your application with pprof endpoints see the [language sdk documentation]({{< relref "./language-sdks/">}}) section.
1818

1919
By default the agent will pull profiles every 10s with no timeout using `http` scheme. This can be configured in the `scrape_configs` section:
2020

@@ -90,13 +90,13 @@ scrape_configs:
9090
path_prefix: '/app'
9191
```
9292

93-
For more details about available configuration options, please refer to the [configuration reference]({{<relref "../configure/reference-configuration-parameters/#scrape-configs">}}).
93+
For more details about available configuration options, please refer to the [server configuration reference]({{<relref "../configure-server/reference-configuration-parameters/#scrape-configs">}}).
9494

9595
## Running the agent
9696

97-
When running Phlare as [monolith]({{<relref "../architecture/deployment-modes/#monolithic-mode">}}) (`-target=all`), the agent is started automatically within the same process and can scrape profiles.
97+
When running Phlare as [monolith]({{<relref "../reference-phlare-architecture/deployment-modes/#monolithic-mode">}}) (`-target=all`), the agent is started automatically within the same process and can scrape profiles.
9898

99-
When running Phlare as [microservices]({{<relref "../architecture/deployment-modes/#microservices-mode">}}), you'll have to start an agent manually as a standalone component and point it to your Phlare cluster.
99+
When running Phlare as [microservices]({{<relref "../reference-phlare-architecture/deployment-modes/#microservices-mode">}}), you'll have to start an agent manually as a standalone component and point it to your Phlare cluster.
100100
This can be handy if you want to run the agent on a different location than the Phlare database.
101101

102102
To start a standalone agent, you can use the following command:
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "Grafana Phlare Language SDKs"
3+
menuTitle: "Language SDKs"
4+
description: "Send data from your application"
5+
weight: 20
6+
---
7+
8+
# Grafana Phlare Language SDKs
9+
10+
The following languages SDKs provide support for sending profiles from your application:
11+
12+
<table>
13+
<tr>
14+
<td align="center"><a href="https://pyroscope.io/docs/golang"><img src="https://user-images.githubusercontent.com/23323466/178160549-2d69a325-56ec-4e19-bca7-d460d400b163.png" width="100px;" alt=""/><br />
15+
<b>Golang</b></a><br />
16+
<a href="https://pyroscope.io/docs/golang" title="Documentation">Documentation</a><br />
17+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/golang-push" title="golang-examples">Examples</a>
18+
</td>
19+
<td align="center"><a href="https://pyroscope.io/docs/java"><img src="https://user-images.githubusercontent.com/23323466/178160550-2b5a623a-0f4c-4911-923f-2c825784d45d.png" width="100px;" alt=""/><br />
20+
<b>Java</b></a><br />
21+
<a href="https://pyroscope.io/docs/java" title="Documentation">Documentation</a><br />
22+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/java-jfr/rideshare" title="java-examples">Examples</a>
23+
</td>
24+
<td align="center"><a href="https://pyroscope.io/docs/python"><img src="https://user-images.githubusercontent.com/23323466/178160553-c78b8c15-99b4-43f3-a2a0-252b6c4862b1.png" width="100px;" alt=""/><br />
25+
<b>Python</b></a><br />
26+
<a href="https://pyroscope.io/docs/python" title="Documentation">Documentation</a><br />
27+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/python" title="python-examples">Examples</a>
28+
</td>
29+
<td align="center"><a href="https://pyroscope.io/docs/ruby"><img src="https://user-images.githubusercontent.com/23323466/178160554-b0be2bc5-8574-4881-ac4c-7977c0b2c195.png" width="100px;" alt=""/><br />
30+
<b>Ruby</b></a><br />
31+
<a href="https://pyroscope.io/docs/ruby" title="Documentation">Documentation</a><br />
32+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/ruby" title="ruby-examples">Examples</a>
33+
</td>
34+
<td align="center"><a href="https://pyroscope.io/docs/rust"><img src="https://user-images.githubusercontent.com/23323466/178160555-fb6aeee7-5d31-4bcb-9e3e-41e9f2f7d5b4.png" width="100px;" alt=""/><br />
35+
<b>Rust</b></a><br />
36+
<a href="https://pyroscope.io/docs/rust" title="Documentation">Documentation</a><br />
37+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/rust/rideshare" title="examples">Examples</a>
38+
</td>
39+
</tr>
40+
<tr>
41+
<td align="center"><a href="https://pyroscope.io/docs/nodejs"><img src="https://user-images.githubusercontent.com/23323466/178160551-a79ee6ff-a5d6-419e-89e6-39047cb08126.png" width="100px;" alt=""/><br />
42+
<b>NodeJS</b></a><br />
43+
<a href="https://pyroscope.io/docs/nodejs" title="Documentation">Documentation</a><br />
44+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/nodejs/express" title="examples">Examples</a>
45+
</td>
46+
<td align="center"><a href="https://pyroscope.io/docs/dotnet"><img src="https://user-images.githubusercontent.com/23323466/178160544-d2e189c6-a521-482c-a7dc-5375c1985e24.png" width="100px;" alt=""/><br />
47+
<b>Dotnet</b></a><br />
48+
<a href="https://pyroscope.io/docs/dotnet" title="Documentation">Documentation</a><br />
49+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/dotnet" title="examples">Examples</a>
50+
</td>
51+
<td align="center"><a href="https://pyroscope.io/docs/ebpf"><img src="https://user-images.githubusercontent.com/23323466/178160548-e974c080-808d-4c5d-be9b-c983a319b037.png" width="100px;" alt=""/><br />
52+
<b>eBPF</b></a><br />
53+
<a href="https://pyroscope.io/docs/ebpf" title="Documentation">Documentation</a><br />
54+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/ebpf" title="examples">Examples</a>
55+
</td>
56+
<td align="center"><a href="https://pyroscope.io/docs/php"><img src="https://user-images.githubusercontent.com/23323466/178160552-7aabf63a-b129-404d-8c62-16dedfefe32c.png" width="100px;" alt=""/><br />
57+
<b>PHP</b></a><br />
58+
<a href="https://pyroscope.io/docs/php" title="Documentation">Documentation</a><br />
59+
<a href="https://github.com/grafana/pyroscope/tree/main/examples/php" title="examples">Examples</a>
60+
</td>
61+
</tr>
62+
</table>
63+
64+
If you're interested in integrating other ecosystems, please reach out to us on [github](https://github.com/grafana/phlare/discussions/293).
65+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)