analytics

package
v0.10.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package analytics deals with collecting pyroscope server usage data.

By default pyroscope server sends anonymized usage data to Pyroscope team. This helps us understand how people use Pyroscope and prioritize features accordingly. We take privacy of our users very seriously and only collect high-level stats such as number of apps added, types of spies used, etc.

You can disable this with a flag or an environment variable

pyroscope server -analytics-opt-out
...
PYROSCOPE_ANALYTICS_OPT_OUT=true pyroscope server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdhocReport added in v0.8.0

func AdhocReport(eventName string, wg *sync.WaitGroup)

Types

type AdhocEvent added in v0.8.0

type AdhocEvent struct {
	Version   string    `json:"version"`
	GitSHA    string    `json:"git_sha"`
	BuildTime string    `json:"build_time"`
	Timestamp time.Time `json:"timestamp"`
	GOOS      string    `json:"goos"`
	GOARCH    string    `json:"goarch"`
	GoVersion string    `json:"go_version"`

	EventName string `json:"event_name"`
}

type Analytics added in v0.8.0

type Analytics struct {
	// metadata
	InstallID            string    `json:"install_id"`
	RunID                string    `json:"run_id"`
	Version              string    `json:"version"`
	GitSHA               string    `json:"git_sha"`
	BuildTime            string    `json:"build_time"`
	Timestamp            time.Time `json:"timestamp"`
	UploadIndex          int       `json:"upload_index"`
	GOOS                 string    `json:"goos"`
	GOARCH               string    `json:"goarch"`
	GoVersion            string    `json:"go_version"`
	AnalyticsPersistence bool      `json:"analytics_persistence"`

	// gauges
	MemAlloc         int `json:"mem_alloc"`
	MemTotalAlloc    int `json:"mem_total_alloc"`
	MemSys           int `json:"mem_sys"`
	MemNumGC         int `json:"mem_num_gc"`
	BadgerMain       int `json:"badger_main"`
	BadgerTrees      int `json:"badger_trees"`
	BadgerDicts      int `json:"badger_dicts"`
	BadgerDimensions int `json:"badger_dimensions"`
	BadgerSegments   int `json:"badger_segments"`
	AppsCount        int `json:"apps_count"`

	// counters
	ControllerIndex      int `json:"controller_index" kind:"cumulative"`
	ControllerComparison int `json:"controller_comparison" kind:"cumulative"`
	ControllerDiff       int `json:"controller_diff" kind:"cumulative"`
	ControllerIngest     int `json:"controller_ingest" kind:"cumulative"`
	ControllerRender     int `json:"controller_render" kind:"cumulative"`
	SpyRbspy             int `json:"spy_rbspy" kind:"cumulative"`
	SpyPyspy             int `json:"spy_pyspy" kind:"cumulative"`
	SpyGospy             int `json:"spy_gospy" kind:"cumulative"`
	SpyEbpfspy           int `json:"spy_ebpfspy" kind:"cumulative"`
	SpyPhpspy            int `json:"spy_phpspy" kind:"cumulative"`
	SpyDotnetspy         int `json:"spy_dotnetspy" kind:"cumulative"`
	SpyJavaspy           int `json:"spy_javaspy" kind:"cumulative"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(cfg *config.Server, s *storage.Storage, p StatsProvider) *Service

func (*Service) Start

func (s *Service) Start()

func (*Service) Stop

func (s *Service) Stop()

type StatsProvider added in v0.0.37

type StatsProvider interface {
	Stats() map[string]int
	AppsCount() int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL