Skip to content

Commit e67a797

Browse files
committed
adds version as one of the things we report in analytics
1 parent 4f4d46c commit e67a797

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/analytics/analytics.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"time"
1010

1111
"github.com/google/uuid"
12+
"github.com/pyroscope-io/pyroscope/pkg/build"
1213
"github.com/pyroscope-io/pyroscope/pkg/config"
1314
"github.com/pyroscope-io/pyroscope/pkg/storage"
1415
"github.com/sirupsen/logrus"
@@ -43,6 +44,7 @@ type Service struct {
4344
type metrics struct {
4445
InstallID string `json:"install_id"`
4546
RunID string `json:"run_id"`
47+
Version string `json:"version"`
4648
Timestamp time.Time `json:"timestamp"`
4749
UploadIndex int `json:"upload_index"`
4850
GOOS string `json:"goos"`
@@ -90,6 +92,7 @@ func (s *Service) sendReport() {
9092
m := metrics{
9193
InstallID: s.s.InstallID(),
9294
RunID: uuid.New().String(),
95+
Version: build.Version,
9396
Timestamp: time.Now(),
9497
UploadIndex: s.uploads,
9598
GOOS: runtime.GOOS,

0 commit comments

Comments
 (0)