telemetry

package
v1.38.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package telemetry implements a client for reporting telemetry data used to prioritize development of SpiceDB.

For more information, see: https://github.com/authzed/spicedb/blob/main/TELEMETRY.md

Index

Constants

View Source
const (
	// DefaultEndpoint is the endpoint to which telemetry will report if none
	// other is specified.
	DefaultEndpoint = "https://telemetry.authzed.com"

	// DefaultInterval is the default amount of time to wait between telemetry
	// reports.
	DefaultInterval = 1 * time.Hour

	// MaxElapsedTimeBetweenReports is the maximum amount of time that the
	// telemetry reporter will attempt to write to the telemetry endpoint
	// before terminating the reporter.
	MaxElapsedTimeBetweenReports = 168 * time.Hour

	// MinimumAllowedInterval is the minimum amount of time one can request
	// between telemetry reports.
	MinimumAllowedInterval = 1 * time.Minute
)

Variables

This section is empty.

Functions

func DisabledReporter

func DisabledReporter(ctx context.Context) error

func RegisterTelemetryCollector

func RegisterTelemetryCollector(datastoreEngine string, ds datastore.Datastore) (*prometheus.Registry, error)

RegisterTelemetryCollector registers a collector for the various pieces of data required by SpiceDB telemetry.

func SilentlyDisabledReporter

func SilentlyDisabledReporter(_ context.Context) error

func SpiceDBClusterInfoCollector added in v1.38.0

func SpiceDBClusterInfoCollector(ctx context.Context, subsystem, dsEngine string, ds datastore.Datastore) (promutil.CollectorFunc, error)

Types

type Reporter

type Reporter func(ctx context.Context) error

func RemoteReporter

func RemoteReporter(
	registry *prometheus.Registry,
	endpoint string,
	caOverridePath string,
	interval time.Duration,
) (Reporter, error)

RemoteReporter creates a telemetry reporter with the specified parameters, or errors if the configuration was invalid.

Jump to

Keyboard shortcuts

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