telemetry

package
v0.51.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

View Source
const (
	GenericError           = 1
	CantCreateLogger       = 8
	TraceAgentNotEnabled   = 9
	CantWritePIDFile       = 10
	CantSetupAutoExit      = 11
	CantConfigureDogstatsd = 12
	CantCreateRCCLient     = 13
	//nolint:revive // TODO(TEL) Fix revive linter
	CantStartHttpServer        = 14
	CantStartUdsServer         = 15
	CantStartWindowsPipeServer = 16
	InvalidIntakeEndpoint      = 17
)

Error codes associated with each startup error The full list, and associated description is contained in the Tracking APM Onboarding RFC

Variables

This section is empty.

Functions

This section is empty.

Types

type OnboardingEvent

type OnboardingEvent struct {
	RequestType string `json:"request_type"`
	//nolint:revive // TODO(TEL) Fix revive linter
	ApiVersion string                 `json:"api_version"`
	Payload    OnboardingEventPayload `json:"payload,omitempty"`
}

OnboardingEvent contains

type OnboardingEventError

type OnboardingEventError struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

OnboardingEventError ...

type OnboardingEventPayload

type OnboardingEventPayload struct {
	EventName string               `json:"event_name"`
	Tags      OnboardingEventTags  `json:"tags"`
	Error     OnboardingEventError `json:"error,omitempty"`
}

OnboardingEventPayload ...

type OnboardingEventTags

type OnboardingEventTags struct {
	InstallID     string `json:"install_id,omitempty"`
	InstallType   string `json:"install_type,omitempty"`
	InstallTime   int64  `json:"install_time,omitempty"`
	AgentPlatform string `json:"agent_platform,omitempty"`
	AgentVersion  string `json:"agent_version,omitempty"`
	AgentHostname string `json:"agent_hostname,omitempty"`
	Env           string `json:"env,omitempty"`
}

OnboardingEventTags ...

type TelemetryCollector

type TelemetryCollector interface {
	SendStartupSuccess()
	SendStartupError(code int, err error)
	SentFirstTrace() bool
	SendFirstTrace()
}

TelemetryCollector is the interface used to send reports about startup to the instrumentation telemetry intake

func NewCollector

func NewCollector(cfg *config.AgentConfig) TelemetryCollector

NewCollector returns either collector, or a noop implementation if instrumentation telemetry is disabled

func NewNoopCollector

func NewNoopCollector() TelemetryCollector

NewNoopCollector returns a noop collector

Jump to

Keyboard shortcuts

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