usagestats

package
v0.40.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	UsageStatsID string                 `json:"usageStatsId"`
	CreatedAt    time.Time              `json:"createdAt"`
	Interval     time.Time              `json:"interval"`
	Version      string                 `json:"version"`
	Metrics      map[string]interface{} `json:"metrics"`
	Os           string                 `json:"os"`
	Arch         string                 `json:"arch"`
	DeployMode   string                 `json:"deployMode"`
}

Report is the payload to be sent to stats.grafana.org

type Reporter

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

Reporter holds the agent seed information and sends report of usage

func NewReporter

func NewReporter(logger log.Logger) (*Reporter, error)

NewReporter creates a Reporter that will send periodically reports to grafana.com

func (*Reporter) Start

func (rep *Reporter) Start(ctx context.Context, metricsFunc func() map[string]interface{}) error

Start inits the reporter seed and start sending report for every interval

Jump to

Keyboard shortcuts

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