Skip to content

Commit

Permalink
[DOC] Set up profiling and tracing intro for sharing (#3073)
Browse files Browse the repository at this point in the history
* Set up profiling and tracing intro for sharing

* ADd exnriching profile data

* Update docs/sources/configure-client/_index.md
  • Loading branch information
knylander-grafana committed Mar 1, 2024
1 parent bbb5f55 commit 17f53f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 141 deletions.
9 changes: 9 additions & 0 deletions docs/sources/configure-client/_index.md
Expand Up @@ -109,4 +109,13 @@ To get started, choose one of the integrations below:
</tr>
</table>

## Enriching profile data

You can add tags to your profiles to help correlate them with your other telemetry signals. Some common tags that are used are version, region, environment, request types, etc. You have the ability to add tags using both the SDK and the agent.

Valid tag formats may contain ASCII letters and digits, as well as underscores. It must match the regex `[a-zA-Z_][a-zA-Z0-9_]`.
In Pyroscope, a period (`.`) is not a valid character inside of tags and labels.

## Assistance with Pyroscope

If you have more questions, feel free to reach out in [our Slack channel](https://grafana.slack.com/) or create an [issue on GitHub](https://github.com/grafana/pyroscope) and the Pyroscope team will help!
143 changes: 2 additions & 141 deletions docs/sources/view-and-analyze-profile-data/profile-tracing/_index.md
Expand Up @@ -14,146 +14,7 @@ keywords:

# Profiling and tracing integration

Profiles, continuous profiling, and distributed traces are all tools that can be used to improve the performance and reliability of applications.
However, each tool has its own strengths and weaknesses, and it is important to choose the right tool for the job as well as understand when to use both.

## Profiling

Profiling offers a deep-dive into an application's performance at the code level, highlighting resource usage and performance spots.

<table>
<tr>
<td>Usage
</td>
<td>During development, major releases, or upon noticing performance quirks.
</td>
</tr>
<tr>
<td>Benefits
</td>
<td>
<ul>

<li>Business: Boosts user experience through enhanced application performance.

<li>Technical: Gives clear insights into code performance and areas of refinement.
</li>
</ul>
</td>
</tr>
<tr>
<td>Example
</td>
<td>A developer uses profiling upon noting slow app performance, identifies a CPU-heavy function, and optimizes it.
</td>
</tr>
</table>


## Continuous profiling

Continuous profiling provides ongoing performance insights, capturing long-term trends and intermittent issues.

<table>
<tr>
<td>Usage
</td>
<td>Mainly in production, especially for high-priority applications.
</td>
</tr>
<tr>
<td>Benefits
</td>
<td>
<ul>

<li>Business: Preemptively addresses inefficiencies, potentially saving costs.

<li>Technical: Highlights performance trends and issues like potential memory leaks over time.
</li>
</ul>
</td>
</tr>
<tr>
<td>Example
</td>
<td>A month-long data from continuous profiling suggests increasing memory consumption, hinting at a memory leak.
</td>
</tr>
</table>


## Distributed tracing

Traces requests as they cross multiple services, revealing interactions and service dependencies.

<table>
<tr>
<td>Usage
</td>
<td>Essential for systems like microservices where requests touch multiple services.
</td>
</tr>
<tr>
<td>Benefits
</td>
<td>
<ul>

<li>Business: Faster issue resolution, reduced downtimes, and strengthened customer trust.

<li>Technical: A broad view of the system's structure, revealing bottlenecks and inter-service dependencies.
</li>
</ul>
</td>
</tr>
<tr>
<td>Example
</td>
<td>In e-commerce, a user's checkout request might involve various services. Tracing depicts this route, pinpointing where time is most spent.
</td>
</tr>
</table>


## Combined power of tracing and profiling

When used together, tracing and provide a powerful tool for understanding system and application performance.

<table>
<tr>
<td>Usage
</td>
<td>For comprehensive system-to-code insights, especially when diagnosing complex issues spread across services and codebases.
</td>
</tr>
<tr>
<td>Benefits
</td>
<td>
<ul>

<li>Business: Reduces downtime, optimizes user experience, and safeguards revenues.

<li>Technical:
<ul>

<li>Holistic view: Tracing pinpoints bottle-necked services, while profiling delves into the responsible code segments.

<li>End-to-end insight: Visualizes a request's full journey and the performance of individual code parts.

<li>Efficient diagnosis: Tracing identifies service latency; profiling zeroes in on its cause, be it database queries, API calls, or specific code inefficiencies.
</li>
</ul>
</li>
</ul>
</td>
</tr>
<tr>
<td>Example
</td>
<td>Tracing reveals latency in a payment service. Combined with profiling, it's found that a particular function, making third-party validation calls, is the culprit. This insight guides optimization, refining system efficiency.
</td>
</tr>
</table>
[//]: # 'Shared content for Trace to profiles in the Pyroscope data source'

{{< docs/shared source="grafana" lookup="datasources/pyroscope-profile-tracing-intro.md" version="<GRAFANA VERSION>" >}}

0 comments on commit 17f53f8

Please sign in to comment.