Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/cluster-agent/subcommands/start/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
fx.Provide(func() option.Option[integrations.Component] {
return option.None[integrations.Component]()
}),
// TODO(erikayasuda): enable this
fx.Provide(func() option.Option[agenttelemetry.Component] {
return option.None[agenttelemetry.Component]()
}),
Expand Down
4 changes: 2 additions & 2 deletions comp/core/agenttelemetry/impl/agenttelemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ func TestRun(t *testing.T) {
for _, job := range r.(*runnerMock).jobs {
totalProfiles += len(job.profiles)
}
// Default config has 12 profiles total (checks, logs-and-metrics, database, api, ondemand, service-discovery, runtime-started, runtime-running, hostname, otlp, trace-agent, gpu)
assert.Equal(t, 12, totalProfiles)
// Default config has 13 profiles total (checks, logs-and-metrics, database, api, ondemand, service-discovery, runtime-started, runtime-running, hostname, otlp, trace-agent, gpu, cluster-agent)
assert.Equal(t, 13, totalProfiles)
}

func TestReportMetricBasic(t *testing.T) {
Expand Down
15 changes: 15 additions & 0 deletions comp/core/agenttelemetry/impl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,21 @@ var defaultProfiles = `
start_after: 60
iterations: 0
period: 900
- name: cluster-agent
metric:
exclude:
zero_metric: true
metrics:
- name: admission_webhooks.image_resolution_attempts
aggregate_tags:
- registry
- repository
- digest_resolution
- outcome
schedule:
start_after: 30
iterations: 0
period: 900
`

func compileMetricsExclude(p *Profile) error {
Expand Down
Loading