Documentation ¶
Index ¶
- Constants
- Variables
- type Entry
- type InstallType
- type ReportAnnotator
- type Reporter
- func (r *Reporter) Close()
- func (r *Reporter) InstallID() string
- func (r *Reporter) Report(ctx context.Context, action string, entries ...Entry)
- func (r *Reporter) Run(ctx context.Context) error
- func (r *Reporter) SetMetadatum(ctx context.Context, key string, value any)
- func (r *Reporter) Start(ctx context.Context)
Constants ¶
const EnvironmentMetadataPrefix = "TELEPRESENCE_REPORT_"
EnvironmentMetadataPrefix is the Environment variable prefix for additional metadata to be reported.
Variables ¶
var DefaultReportAnnotators []ReportAnnotator //nolint:gochecknoglobals // extension point
DefaultReportAnnotators are the default annotator functions that the NewReporter function will pass to NewReporterForInstallType.
Functions ¶
This section is empty.
Types ¶
type InstallType ¶ added in v2.5.4
type InstallType string
const ( CLI InstallType = "cli" Docker InstallType = "docker" )
type ReportAnnotator ¶ added in v2.9.3
type Reporter ¶ added in v2.4.10
type Reporter struct {
// contains filtered or unexported fields
}
Reporter is a Metriton reported.
func NewReporter ¶ added in v2.4.10
NewReporter creates a new initialized Reporter instance that can be used to send telepresence reports to Metriton.
func NewReporterForInstallType ¶ added in v2.5.4
func NewReporterForInstallType(ctx context.Context, mode string, installType InstallType, reportAnnotators []ReportAnnotator) *Reporter
func (*Reporter) Report ¶ added in v2.4.10
Report constructs and buffers a report on the send queue. It includes the fixed (growing) set of metadata in the Reporter structure and the entries passed as arguments to this call. It also includes and increments the index, which can be used to determine the correct order of reported events for this installation attempt (correlated by the trace_id set at the start).
func (*Reporter) Run ¶ added in v2.4.10
Run ensures that all reports on the send queue are sent to the endpoint.
func (*Reporter) SetMetadatum ¶ added in v2.4.10
SetMetadatum associates the given key with the given value in the metadata of this instance.