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

Adds anonymous statistics reporting #356

Merged
merged 5 commits into from
Oct 25, 2022
Merged

Adds anonymous statistics reporting #356

merged 5 commits into from
Oct 25, 2022

Conversation

cyriltovena
Copy link
Collaborator

This is an example of the data being sent:

{
 "clusterID": "87996d6e-a28c-4d71-bf29-b8c1c80217d4",
 "createdAt": "2022-10-24T17:37:52.428098+02:00",
 "interval": "2022-10-24T21:17:07.428098+02:00",
 "intervalPeriod": 15,
 "target": "all",
 "version": {
  "version": "",
  "revision": "",
  "branch": "",
  "buildUser": "",
  "buildDate": "",
  "goVersion": "go1.19"
 },
 "os": "darwin",
 "arch": "amd64",
 "edition": "oss",
 "metrics": {
  "num_goroutine": 82,
  "distributor_profile_type_memory_received": {
   "total": 3,
   "rate": 0.0699954858592921
  },
  "distributor_replication_factor": 1,
  "ingester_active_tenants": 1,
  "num_cpu": 16,
  "distributor_bytes_received_total": {
   "total": 62303,
   "rate": 1252.6767081968958
  },
  "distributor_profile_type_block_received": {
   "total": 3,
   "rate": 0.07160711730364862
  },
  "distributor_profile_type_goroutine_received": {
   "total": 3,
   "rate": 0.07748612728011331
  },
  "distributor_profiles_received": {
   "total": 13,
   "rate": 0.2613805580541426
  },
  "memstats": {
   "num_gc": 9,
   "gc_cpu_fraction": 0.00021599721764962762,
   "alloc": 32432216,
   "total_alloc": 62217232,
   "sys": 56997128,
   "pause_total_ns": 2157750,
   "heap_alloc": 32432216,
   "heap_inuse": 36208640,
   "stack_inuse": 1835008
  },
  "distributor_bytes_received": {
   "max": 16437,
   "stddev": 5615.743195084342,
   "stdvar": 31536571.633136094,
   "avg": 4792.538461538461,
   "count": 13,
   "min": 104
  },
  "distributor_profile_type_mutex_received": {
   "total": 3,
   "rate": 0.07175572979102102
  },
  "distributor_profile_type_process_cpu_received": {
   "total": 1,
   "rate": 0.05736014690768328
  },
  "store_object_type": "filesystem"
 }
}

Copy link
Collaborator

@simonswine simonswine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I have tested it a bit locally. The file seems to be written, so I think we should give this a spin in dev

pkg/phlare/phlare.go Outdated Show resolved Hide resolved
pkg/phlare/phlare.go Outdated Show resolved Hide resolved
pkg/usagestats/reporter.go Outdated Show resolved Hide resolved
# Enable anonymous usage reporting.
# CLI flag: -reporting.enabled
[reporting_enabled: <boolean> | default = true]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/phlare/modules.go Show resolved Hide resolved
pkg/phlare/modules.go Outdated Show resolved Hide resolved
pkg/phlare/modules.go Outdated Show resolved Hide resolved
@simonswine
Copy link
Collaborator

Test_Memberlist seems to have some flakes, will need to watch this

@cyriltovena cyriltovena enabled auto-merge (squash) October 25, 2022 09:55
@cyriltovena cyriltovena merged commit 7de0c86 into main Oct 25, 2022
@cyriltovena cyriltovena deleted the phone-home branch October 25, 2022 10:04
simonswine added a commit to simonswine/pyroscope that referenced this pull request Jun 30, 2023
* Adds anonymous statistics reporting

* Update go mod

* Review feedback

Co-authored-by: Christian Simon <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants