observability(events): Adding telemetry flag and and telemetry sink event type with tests

This commit is contained in:
Sepehr authored and Jim committed 2023-09-22 11:31:42 -04:00
1 parent 16d86d601a
commit e278964422
12 files changed
+137 -1

No files matched your search

+8
View File
@@ -95,6 +95,7 @@ type Command struct {
flagEventFormat string
flagAudit string
flagObservations string
flagTelemetry string
flagSysEvents string
flagEveryEventAllowFilters []string
flagEveryEventDenyFilters []string
@@ -337,6 +338,12 @@ func (c *Command) Flags() *base.FlagSets {
Completion: complete.PredictSet("true", "false"),
Usage: `Emit observation events. Supported values are "true" and "false".`,
})
f.StringVar(&base.StringVar{
Name: "telemetry-events",
Target: &c.flagTelemetry,
Completion: complete.PredictSet("true", "false"),
Usage: `Emit telemetry events. Supported values are "true" and "false".`,
})
f.StringVar(&base.StringVar{
Name: "audit-events",
Target: &c.flagAudit,
@@ -646,6 +653,7 @@ func (c *Command) Run(args []string) int {
Format: c.flagEventFormat,
Audit: c.flagAudit,
Observations: c.flagObservations,
Telemetry: c.flagTelemetry,
SysEvents: c.flagSysEvents,
Allow: c.flagEveryEventAllowFilters,
Deny: c.flagEveryEventDenyFilters,