Skip to content
Merged
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: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,6 @@
/comp/core/workloadmeta/collectors/internal/nvml @DataDog/ebpf-platform
/comp/core/workloadmeta/collectors/internal/podman @DataDog/container-platform @DataDog/container-integrations
/comp/core/workloadmeta/collectors/internal/process @DataDog/container-experiences @DataDog/container-platform
/comp/core/workloadmeta/collectors/internal/processlanguage @DataDog/container-experiences @DataDog/container-platform
/comp/core/tagger/collectors @DataDog/container-platform @DataDog/container-integrations
/pkg/sbom/ @DataDog/agent-security @DataDog/container-integrations
/pkg/networkpath/ @DataDog/cloud-network-monitoring
Expand Down
1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,6 @@ workflow:
- comp/process/**/*
- pkg/process/**/*
- comp/core/workloadmeta/collectors/internal/process/**/*
- comp/core/workloadmeta/collectors/internal/processlanguage/**/*
- comp/core/workloadmeta/collectors/internal/remote/processcollector/**/*
compare_to: $COMPARE_TO_BRANCH

Expand Down
3 changes: 0 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,6 @@ issues:
- path: comp/core/workloadmeta/collectors/internal/process/process_collector.go
linters:
- pkgconfigusage
- path: comp/core/workloadmeta/collectors/internal/processlanguage/process_collector.go
linters:
- pkgconfigusage
- path: comp/core/workloadmeta/collectors/internal/remote/generic.go
linters:
- pkgconfigusage
Expand Down
2 changes: 0 additions & 2 deletions comp/core/workloadmeta/collectors/catalog-core/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/nvml"
"github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/podman"
"github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/process"
"github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/processlanguage"
remoteprocesscollector "github.com/DataDog/datadog-agent/comp/core/workloadmeta/collectors/internal/remote/processcollector"
)

Expand All @@ -37,7 +36,6 @@ func getCollectorOptions() []fx.Option {
kubemetadata.GetFxOptions(),
podman.GetFxOptions(),
remoteprocesscollector.GetFxOptions(),
processlanguage.GetFxOptions(),
nvml.GetFxOptions(),
process.GetFxOptions(),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,8 @@ func (c *collector) processCollectionIntervalConfig() time.Duration {
// is done. It also gets a reference to the store that started it so it
// can use Notify, or get access to other entities in the store.
func (c *collector) Start(ctx context.Context, store workloadmeta.Component) error {
// TODO: process_config.process_collection.use_wlm is temporary and will eventually be removed
// we want to gate everything for this new collector by the use_wlm config, but eventually
// this collector will be gated separately for process_collector OR service discovery
if !c.config.GetBool("process_config.process_collection.use_wlm") {
return errors.NewDisabled(componentName, "wlm process collection disabled")
}

if !c.isProcessCollectionEnabled() && !c.isServiceDiscoveryEnabled() && !c.isLanguageCollectionEnabled() {
return errors.NewDisabled(componentName, "wlm process collection and service discovery are disabled")
return errors.NewDisabled(componentName, "process collection and service discovery are disabled")
}

if c.containerProvider == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

//go:build linux && test

// Package processlanguage implements the process language collector for
// Workloadmeta.
// Package process implements the process collector for Workloadmeta.
package process

import (
Expand Down Expand Up @@ -98,7 +97,6 @@ func TestBasicCreatedProcessesCollection(t *testing.T) {
t.Run(tc.description, func(t *testing.T) {
cfg := config.NewMock(t)
cfg.SetWithoutSource("process_config.process_collection.enabled", true)
cfg.SetWithoutSource("process_config.process_collection.use_wlm", true)
cfg.SetWithoutSource("process_config.intervals.process", 10)

c := setUpCollectorTest(t, cfg, nil, nil)
Expand Down Expand Up @@ -177,7 +175,6 @@ func TestCreatedProcessesCollectionWithLanguages(t *testing.T) {
t.Run(tc.description, func(t *testing.T) {
cfg := config.NewMock(t)
cfg.SetWithoutSource("process_config.process_collection.enabled", true)
cfg.SetWithoutSource("process_config.process_collection.use_wlm", true)
cfg.SetWithoutSource("process_config.intervals.process", 10)
cfg.SetWithoutSource("language_detection.enabled", true)

Expand Down Expand Up @@ -285,7 +282,6 @@ func TestCreatedProcessesCollectionWithContainers(t *testing.T) {
t.Run(tc.description, func(t *testing.T) {
cfg := config.NewMock(t)
cfg.SetWithoutSource("process_config.process_collection.enabled", true)
cfg.SetWithoutSource("process_config.process_collection.use_wlm", true)
cfg.SetWithoutSource("process_config.intervals.process", 10)

c := setUpCollectorTest(t, cfg, nil, nil)
Expand Down Expand Up @@ -444,7 +440,6 @@ func TestProcessLifecycleCollection(t *testing.T) {
t.Run(tc.description, func(t *testing.T) {
cfg := config.NewMock(t)
cfg.SetWithoutSource("process_config.process_collection.enabled", true)
cfg.SetWithoutSource("process_config.process_collection.use_wlm", true)
cfg.SetWithoutSource("process_config.intervals.process", 10)
cfg.SetWithoutSource("language_detection.enabled", true)

Expand Down Expand Up @@ -504,7 +499,6 @@ func TestStartConfiguration(t *testing.T) {
description: "everything enabled correctly",
configOverrides: map[string]interface{}{
"process_config.process_collection.enabled": true,
"process_config.process_collection.use_wlm": true,
},
sysConfigOverrides: map[string]interface{}{
"discovery.enabled": true,
Expand All @@ -515,7 +509,6 @@ func TestStartConfiguration(t *testing.T) {
description: "only process collection enabled",
configOverrides: map[string]interface{}{
"process_config.process_collection.enabled": true,
"process_config.process_collection.use_wlm": true,
},
sysConfigOverrides: map[string]interface{}{
"discovery.enabled": false,
Expand All @@ -526,57 +519,21 @@ func TestStartConfiguration(t *testing.T) {
description: "only service discovery enabled",
configOverrides: map[string]interface{}{
"process_config.process_collection.enabled": false,
"process_config.process_collection.use_wlm": true,
},
sysConfigOverrides: map[string]interface{}{
"discovery.enabled": true,
},
expectedError: nil,
},
{
description: "only service discovery enabled but use_wlm gate disabled",
description: "process collection and service discovery not enabled",
configOverrides: map[string]interface{}{
"process_config.process_collection.enabled": false,
"process_config.process_collection.use_wlm": false,
},
sysConfigOverrides: map[string]interface{}{
"discovery.enabled": true,
},
expectedError: errors.NewDisabled(componentName, "wlm process collection disabled"),
},
{
description: "only process collection enabled but use_wlm gate disabled",
configOverrides: map[string]interface{}{
"process_config.process_collection.enabled": true,
"process_config.process_collection.use_wlm": false,
},
sysConfigOverrides: map[string]interface{}{
"discovery.enabled": false,
},
expectedError: errors.NewDisabled(componentName, "wlm process collection disabled"),
},

{
description: "everything enabled but use_wlm gate disabled",
configOverrides: map[string]interface{}{
"process_config.process_collection.enabled": true,
"process_config.process_collection.use_wlm": false,
},
sysConfigOverrides: map[string]interface{}{
"discovery.enabled": true,
},
expectedError: errors.NewDisabled(componentName, "wlm process collection disabled"),
},
{
description: "use_wlm gate_enabled but process collection and service discovery not enabled",
configOverrides: map[string]interface{}{
"process_config.process_collection.enabled": false,
"process_config.process_collection.use_wlm": true,
},
sysConfigOverrides: map[string]interface{}{
"discovery.enabled": false,
},
expectedError: errors.NewDisabled(componentName, "wlm process collection and service discovery are disabled"),
expectedError: errors.NewDisabled(componentName, "process collection and service discovery are disabled"),
},
} {
t.Run(tc.description, func(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ func TestServiceStoreLifetimeProcessCollectionDisabled(t *testing.T) {
cfg := config.NewMock(t)
cfg.SetWithoutSource("process_config.process_collection.enabled", false)
cfg.SetWithoutSource("language_detection.enabled", false)
cfg.SetWithoutSource("process_config.process_collection.use_wlm", true)

c := setUpCollectorTest(t, cfg, sysConfigOverrides, nil)
defer c.cleanup()
Expand Down Expand Up @@ -464,7 +463,6 @@ func TestServiceStoreLifetime(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
cfg := config.NewMock(t)
cfg.SetWithoutSource("process_config.process_collection.enabled", true)
cfg.SetWithoutSource("process_config.process_collection.use_wlm", true)
cfg.SetWithoutSource("language_detection.enabled", true)
// setting process collection interval to the same as the service collection interval
// because it makes the test simpler until the service collection interval is configurable
Expand Down Expand Up @@ -567,7 +565,6 @@ func TestProcessDeathRemovesServiceData(t *testing.T) {

cfg := config.NewMock(t)
cfg.SetWithoutSource("process_config.process_collection.enabled", true)
cfg.SetWithoutSource("process_config.process_collection.use_wlm", true)
cfg.SetWithoutSource("language_detection.enabled", true)
// setting process collection interval to the same as the service collection interval
// because it makes the test simpler until the service collection interval is configurable
Expand Down
Loading