agents/anchor-edge-agent/internal/collector/events.go
Metadata
- Purpose: Edge agent runtime code for endpoint telemetry collection and transport.
- Domain:
agents - Language:
go - Bytes: 2059
- Lines: 72
- Content hash (short):
89b6fb44 - Source (start): agents/anchor-edge-agent/internal/collector/events.go:1
- Source (end): agents/anchor-edge-agent/internal/collector/events.go:72
Indexed Symbols
buildBaseEvent(line 10, go function) - Implements build base event for telemetry collection.BuildPatchCompliance(line 23, go function) - Implements build patch compliance for telemetry collection.BuildBackupFailure(line 33, go function) - Implements build backup failure for telemetry collection.BuildServiceDegraded(line 43, go function) - Implements build service degraded for telemetry collection.CollectProfileEvents(line 53, go function) - Implements collect profile events for telemetry collection.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
package collector
import (
"strings"
"time"
"github.com/anchor-msp/anchor-edge-agent/internal/types"
)
func buildBaseEvent(config Config, kind string) types.TelemetryEvent {
return types.TelemetryEvent{
EventID: pseudoUUID(),
WorkspaceID: config.WorkspaceID,
ClientID: config.ClientID,
AssetID: config.AssetID,
OccurredAt: time.Now().UTC(),
CorrelationID: pseudoUUID(),
Kind: kind,
Data: map[string]any{},
}
}
func BuildPatchCompliance(config Config, compliant bool, missingCritical, missingImportant int) types.TelemetryEvent {
event := buildBaseEvent(config, "PatchCompliance")
event.Data = map[string]any{