Skip to content

Commit e35c48a

Browse files
397 Add doc for anonymous usage stats (#4104) (#4109)
* 397 Add doc for anonymous usage stats * Specify exactly what usage statistics Pyroscope reports * Add links to the anonymous usage statistics page * Run "make reference-help" --------- Co-authored-by: Aleksandar Petrov <8142643+aleks-p@users.noreply.github.com> Co-authored-by: Christian Simon <simon@swine.de> (cherry picked from commit 70a2dbd) Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
1 parent 0c123d2 commit e35c48a

File tree

8 files changed

+90
-8
lines changed

8 files changed

+90
-8
lines changed

cmd/pyroscope/help-all.txt.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,7 +1092,7 @@ Usage of ./pyroscope:
10921092
-tracing.profiling-enabled
10931093
[experimental] Set to true to enable profiling integration.
10941094
-usage-stats.enabled
1095-
Enable anonymous usage reporting. (default true)
1095+
Enable anonymous usage statistics collection. For more details about usage statistics, refer to https://grafana.com/docs/pyroscope/latest/configure-server/anonymous-usage-statistics-reporting/ (default true)
10961096
-validation.enforce-labels-order
10971097
Enforce labels order optimization.
10981098
-validation.max-label-names-per-series int

cmd/pyroscope/help.txt.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ Usage of ./pyroscope:
408408
-tracing.enabled
409409
Set to false to disable tracing. (default true)
410410
-usage-stats.enabled
411-
Enable anonymous usage reporting. (default true)
411+
Enable anonymous usage statistics collection. For more details about usage statistics, refer to https://grafana.com/docs/pyroscope/latest/configure-server/anonymous-usage-statistics-reporting/ (default true)
412412
-validation.enforce-labels-order
413413
Enforce labels order optimization.
414414
-validation.max-label-names-per-series int
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
3+
description: Learn about Grafana Pyroscope anonymous usage statistics reporting
4+
menuTitle: Anonymous usage statistics reporting
5+
title: About Grafana Pyroscope anonymous usage statistics reporting
6+
weight: 30
7+
---
8+
9+
# About Grafana Pyroscope anonymous usage statistics reporting
10+
11+
Grafana Pyroscope includes a system that optionally and anonymously reports non-sensitive, non-personally identifiable information about the running Pyroscope cluster to a remote statistics server.
12+
Pyroscope maintainers use this anonymous information to learn more about how the open source community runs Pyroscope and what the Pyroscope team should focus on when working on the next features and documentation improvements.
13+
14+
The anonymous usage statistics reporting is **enabled by default**.
15+
You can opt-out setting the CLI flag `-usage-stats.enabled=false` or its respective YAML configuration option.
16+
17+
## The statistics server
18+
19+
When usage statistics reporting is enabled, information is collected by a server that Grafana Labs runs. Statistics are collected at `https://stats.grafana.org`.
20+
21+
## Which information is collected
22+
23+
When the usage statistics reporting is enabled, Grafana Pyroscope collects the following information:
24+
25+
- Information about the **Pyroscope cluster and version**:
26+
- A unique, randomly-generated Pyroscope cluster identifier, such as `3749b5e2-b727-4107-95ae-172abac27496`.
27+
- The timestamp when the anonymous usage statistics reporting was enabled for the first time, and the cluster identifier was created.
28+
- The Pyroscope version, such as `1.13.1`.
29+
- The Pyroscope branch, revision, and Golang version that was used to build the binary.
30+
- Information about the **environment** where Pyroscope is running:
31+
- The operating system, such as `linux`.
32+
- The architecture, such as `amd64`.
33+
- The Pyroscope memory utilization and number of goroutines.
34+
- The number of logical CPU cores available to the Pyroscope process.
35+
- Information about the Pyroscope **configuration**:
36+
- The `-target` parameter value, such as `all` when running Pyroscope in monolithic mode.
37+
- The `-storage.backend` value, such as `s3`.
38+
- The `-distributor.replication-factor` value, such as `3`.
39+
- Information about the Pyroscope **cluster scale**:
40+
- Distributor:
41+
- Bytes received.
42+
- Profiles received with breakdown by profile type and programming language.
43+
- Profile sizes with breakdown by programming language.
44+
- Ingester:
45+
- Number of active tenants.
46+
47+
48+
{{< admonition type="note" >}}
49+
Pyroscope maintainers commit to keeping the list of tracked information updated over time, and reporting any change both via the CHANGELOG and the release notes.
50+
{{< /admonition >}}
51+
52+
## Disable the anonymous usage statistics reporting
53+
54+
If possible, we ask you to keep the usage reporting feature enabled and help us understand more about how the open source community runs Pyroscope.
55+
In case you want to opt-out from anonymous usage statistics reporting, set the CLI flag `-usage-stats.enabled=false` or change the following YAML configuration:
56+
57+
```yaml
58+
analytics:
59+
reporting_enabled: false
60+
```

docs/sources/configure-server/reference-configuration-parameters/index.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ self_profiling:
288288
# CLI flag: -auth.multitenancy-enabled
289289
[multitenancy_enabled: <boolean> | default = false]
290290

291-
analytics:
292-
# Enable anonymous usage reporting.
293-
# CLI flag: -usage-stats.enabled
294-
[reporting_enabled: <boolean> | default = true]
291+
# The analytics block configures usage statistics collection. For more details
292+
# about usage statistics, refer to [Anonymous usage statistics
293+
# reporting](../anonymous-usage-statistics-reporting)
294+
[analytics: <analytics>]
295295

296296
# Prints the application banner at startup.
297297
# CLI flag: -config.show_banner
@@ -2532,4 +2532,15 @@ The `filesystem_storage_backend` block configures the usage of local file system
25322532
[dir: <string> | default = "./data-shared"]
25332533
```
25342534

2535+
### analytics
2536+
2537+
The `analytics` block configures usage statistics collection. For more details about usage statistics, refer to [Anonymous usage statistics reporting](../anonymous-usage-statistics-reporting)
2538+
2539+
```yaml
2540+
# Enable anonymous usage statistics collection. For more details about usage
2541+
# statistics, refer to
2542+
# https://grafana.com/docs/pyroscope/latest/configure-server/anonymous-usage-statistics-reporting/
2543+
# CLI flag: -usage-stats.enabled
2544+
[reporting_enabled: <boolean> | default = true]
25352545
```
2546+

docs/sources/configure-server/reference-configuration-parameters/index.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ where `default_value` is the value to use if the environment variable is undefin
6060

6161
{{ .ConfigFile }}
6262

63-
```

docs/sources/get-started/_index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ For more information on the different ways to deploy Pyroscope, see [Pyroscope d
2727

2828
Verify that you have installed [Docker](https://docs.docker.com/engine/install/).
2929

30+
{{< admonition type="note" >}}
31+
Pyroscope includes a system that optionally and anonymously reports non-sensitive, non-personally identifiable information about the running Pyroscope cluster to a remote statistics server to help Pyroscope maintainers understand how the open source community runs Pyroscope.
32+
33+
To opt out, refer to [Disable the anonymous usage statistics reporting](../configure-server/anonymous-usage-statistics-reporting#disable-the-anonymous-usage-statistics-reporting).
34+
{{< /admonition >}}
35+
3036
## Download and configure Pyroscope
3137

3238
1. Download Pyroscope.

pkg/usagestats/reporter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type Config struct {
4646

4747
// RegisterFlags adds the flags required to config this to the given FlagSet
4848
func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
49-
f.BoolVar(&cfg.Enabled, "usage-stats.enabled", true, "Enable anonymous usage reporting.")
49+
f.BoolVar(&cfg.Enabled, "usage-stats.enabled", true, "Enable anonymous usage statistics collection. For more details about usage statistics, refer to https://grafana.com/docs/pyroscope/latest/configure-server/anonymous-usage-statistics-reporting/")
5050
}
5151

5252
type Reporter struct {

tools/doc-generator/parse/root_blocks.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"github.com/grafana/pyroscope/pkg/querier/worker"
2323
"github.com/grafana/pyroscope/pkg/scheduler"
2424
"github.com/grafana/pyroscope/pkg/storegateway"
25+
"github.com/grafana/pyroscope/pkg/usagestats"
2526
"github.com/grafana/pyroscope/pkg/validation"
2627
)
2728

@@ -113,4 +114,9 @@ var RootBlocks = []RootBlock{
113114
StructType: reflect.TypeOf(filesystem.Config{}),
114115
Desc: "The filesystem_storage_backend block configures the usage of local file system as object storage backend.",
115116
},
117+
{
118+
Name: "analytics",
119+
StructType: reflect.TypeOf(usagestats.Config{}),
120+
Desc: "The analytics block configures usage statistics collection. For more details about usage statistics, refer to [Anonymous usage statistics reporting](../anonymous-usage-statistics-reporting)",
121+
},
116122
}

0 commit comments

Comments
 (0)