Skip to content

Commit

Permalink
Merge d30fc18 into 32f5a2e
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoCaso authored Oct 22, 2024
2 parents 32f5a2e + d30fc18 commit 9097e0c
Show file tree
Hide file tree
Showing 160 changed files with 1,103 additions and 1,187 deletions.
3 changes: 2 additions & 1 deletion cmd/agent/subcommands/diagnose/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ func cmdDiagnose(cliParams *cliParams,
ac autodiscovery.Component,
secretResolver secrets.Component,
_ log.Component,
tagger tagger.Component,
) error {
diagCfg := diagnosis.Config{
Verbose: cliParams.verbose,
Expand All @@ -303,7 +304,7 @@ func cmdDiagnose(cliParams *cliParams,
return nil
}

diagnoseDeps := diagnose.NewSuitesDepsInCLIProcess(senderManager, secretResolver, wmeta, ac)
diagnoseDeps := diagnose.NewSuitesDepsInCLIProcess(senderManager, secretResolver, wmeta, ac, tagger)
// Run command

// Get the diagnose result
Expand Down
11 changes: 8 additions & 3 deletions cmd/agent/subcommands/flare/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
authtokenimpl "github.com/DataDog/datadog-agent/comp/api/authtoken/fetchonlyimpl"
"github.com/DataDog/datadog-agent/comp/collector/collector"
"github.com/DataDog/datadog-agent/comp/core"
"github.com/DataDog/datadog-agent/comp/core/autodiscovery"
"github.com/DataDog/datadog-agent/comp/core/autodiscovery/autodiscoveryimpl"
"github.com/DataDog/datadog-agent/comp/core/config"
"github.com/DataDog/datadog-agent/comp/core/flare"
Expand Down Expand Up @@ -126,8 +127,12 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
InitHelper: common.GetWorkloadmetaInit(),
NoInstance: !cliParams.forceLocal, //if forceLocal is true, we want to run workloadmeta
}),
taggerimpl.OptionalModule(),
autodiscoveryimpl.OptionalModule(), // if forceLocal is true, we will start autodiscovery (loadComponents) later
fx.Provide(tagger.NewTaggerParams),
taggerimpl.Module(),
autodiscoveryimpl.Module(), // if forceLocal is true, we will start autodiscovery (loadComponents) later
fx.Provide(func(ac autodiscovery.Component) optional.Option[autodiscovery.Component] {
return optional.NewOption[autodiscovery.Component](ac)
}),
fx.Supply(optional.NewNoneOption[collector.Component]()),
compressionimpl.Module(),
diagnosesendermanagerimpl.Module(),
Expand Down Expand Up @@ -282,7 +287,7 @@ func makeFlare(flareComp flare.Component,
_ sysprobeconfig.Component,
cliParams *cliParams,
_ optional.Option[workloadmeta.Component],
_ optional.Option[tagger.Component]) error {
_ tagger.Component) error {
var (
profile flare.ProfileData
err error
Expand Down
5 changes: 3 additions & 2 deletions cmd/agent/subcommands/jmx/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ func runJmxCommandConsole(config config.Component,
agentAPI internalAPI.Component,
collector optional.Option[collector.Component],
jmxLogger jmxlogger.Component,
logReceiver optional.Option[integrations.Component]) error {
logReceiver optional.Option[integrations.Component],
tagger tagger.Component) error {
// This prevents log-spam from "comp/core/workloadmeta/collectors/internal/remote/process_collector/process_collector.go"
// It appears that this collector creates some contention in AD.
// Disabling it is both more efficient and gets rid of this log spam
Expand All @@ -313,7 +314,7 @@ func runJmxCommandConsole(config config.Component,

// Create the CheckScheduler, but do not attach it to
// AutoDiscovery.
pkgcollector.InitCheckScheduler(collector, senderManager, logReceiver)
pkgcollector.InitCheckScheduler(collector, senderManager, logReceiver, tagger)

// if cliSelectedChecks is empty, then we want to fetch all check configs;
// otherwise, we fetch only the matching cehck configs.
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent/subcommands/run/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ func startAgent(

// Set up check collector
commonchecks.RegisterChecks(wmeta, tagger, cfg, telemetry)
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer, logReceiver), true)
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer, logReceiver, tagger), true)

demultiplexer.AddAgentStartupTelemetry(version.AgentVersion)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"github.com/DataDog/datadog-agent/comp/aggregator/demultiplexer/demultiplexerimpl"
"github.com/DataDog/datadog-agent/comp/core"
"github.com/DataDog/datadog-agent/comp/core/config"
"github.com/DataDog/datadog-agent/comp/core/tagger"
"github.com/DataDog/datadog-agent/comp/core/tagger/taggerimpl"
workloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/def"
workloadmetafxmock "github.com/DataDog/datadog-agent/comp/core/workloadmeta/fx-mock"
"github.com/DataDog/datadog-agent/comp/dogstatsd"
Expand All @@ -38,12 +40,17 @@ func TestDogstatsdMetricsStats(t *testing.T) {
assert := assert.New(t)
var err error

taggerComponent := fxutil.Test[tagger.Mock](t, taggerimpl.MockModule())

deps := fxutil.Test[testDeps](t, fx.Options(
core.MockBundle(),
fx.Supply(core.BundleParams{}),
demultiplexerimpl.MockModule(),
dogstatsd.Bundle(server.Params{Serverless: false}),
defaultforwarder.MockModule(),
fx.Provide(func() tagger.Component {
return taggerComponent
}),
workloadmetafxmock.MockModule(workloadmeta.NewParams()),
))

Expand Down
3 changes: 3 additions & 0 deletions cmd/agent/subcommands/snmp/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/DataDog/datadog-agent/comp/core/config"
log "github.com/DataDog/datadog-agent/comp/core/log/def"
"github.com/DataDog/datadog-agent/comp/core/secrets"
nooptagger "github.com/DataDog/datadog-agent/comp/core/tagger/noopimpl"
"github.com/DataDog/datadog-agent/comp/forwarder"
"github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform/eventplatformimpl"
Expand Down Expand Up @@ -141,6 +142,7 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
forwarder.Bundle(defaultforwarder.NewParams(defaultforwarder.WithFeatures(defaultforwarder.CoreFeatures))),
orchestratorimpl.Module(orchestratorimpl.NewDefaultParams()),
eventplatformimpl.Module(eventplatformimpl.NewDefaultParams()),
nooptagger.Module(),
compressionimpl.Module(),
eventplatformreceiverimpl.Module(),
)
Expand Down Expand Up @@ -197,6 +199,7 @@ func Commands(globalParams *command.GlobalParams) []*cobra.Command {
forwarder.Bundle(defaultforwarder.NewParams(defaultforwarder.WithFeatures(defaultforwarder.CoreFeatures))),
eventplatformimpl.Module(eventplatformimpl.NewDefaultParams()),
eventplatformreceiverimpl.Module(),
nooptagger.Module(),
compressionimpl.Module(),
snmpscanfx.Module(),
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/cluster-agent-cloudfoundry/subcommands/run/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func run(
common.LoadComponents(secretResolver, wmeta, ac, pkgconfigsetup.Datadog().GetString("confd_path"))

// Set up check collector
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer, logReceiver), true)
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer, logReceiver, taggerComp), true)

// start the autoconfig, this will immediately run any configured check
ac.LoadAndRun(mainCtx)
Expand Down
8 changes: 4 additions & 4 deletions cmd/cluster-agent/api/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
)

// SetupHandlers adds the specific handlers for cluster agent endpoints
func SetupHandlers(r *mux.Router, wmeta workloadmeta.Component, ac autodiscovery.Component, statusComponent status.Component, settings settings.Component) {
func SetupHandlers(r *mux.Router, wmeta workloadmeta.Component, ac autodiscovery.Component, statusComponent status.Component, settings settings.Component, taggerComp tagger.Component) {
r.HandleFunc("/version", getVersion).Methods("GET")
r.HandleFunc("/hostname", getHostname).Methods("GET")
r.HandleFunc("/flare", func(w http.ResponseWriter, r *http.Request) {
Expand All @@ -48,7 +48,7 @@ func SetupHandlers(r *mux.Router, wmeta workloadmeta.Component, ac autodiscovery
r.HandleFunc("/config/list-runtime", settings.ListConfigurable).Methods("GET")
r.HandleFunc("/config/{setting}", settings.GetValue).Methods("GET")
r.HandleFunc("/config/{setting}", settings.SetValue).Methods("POST")
r.HandleFunc("/tagger-list", getTaggerList).Methods("GET")
r.HandleFunc("/tagger-list", func(w http.ResponseWriter, r *http.Request) { getTaggerList(w, r, taggerComp) }).Methods("GET")
r.HandleFunc("/workload-list", func(w http.ResponseWriter, r *http.Request) {
getWorkloadList(w, r, wmeta)
}).Methods("GET")
Expand Down Expand Up @@ -177,8 +177,8 @@ func getConfigCheck(w http.ResponseWriter, _ *http.Request, ac autodiscovery.Com
}

//nolint:revive // TODO(CINT) Fix revive linter
func getTaggerList(w http.ResponseWriter, _ *http.Request) {
response := tagger.List()
func getTaggerList(w http.ResponseWriter, _ *http.Request, taggerComp tagger.Component) {
response := taggerComp.List()

jsonTags, err := json.Marshal(response)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cluster-agent/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func StartServer(ctx context.Context, w workloadmeta.Component, taggerComp tagge
apiRouter = router.PathPrefix("/api/v1").Subrouter()

// IPC REST API server
agent.SetupHandlers(router, w, ac, statusComponent, settings)
agent.SetupHandlers(router, w, ac, statusComponent, settings, taggerComp)

// API V1 Metadata APIs
v1.InstallMetadataEndpoints(apiRouter, w)
Expand Down
4 changes: 2 additions & 2 deletions cmd/cluster-agent/subcommands/start/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ func start(log log.Component,

// Set up check collector
registerChecks(wmeta, taggerComp, config)
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer, logReceiver), true)
ac.AddScheduler("check", pkgcollector.InitCheckScheduler(optional.NewOption(collector), demultiplexer, logReceiver, taggerComp), true)

// start the autoconfig, this will immediately run any configured check
ac.LoadAndRun(mainCtx)
Expand Down Expand Up @@ -590,6 +590,6 @@ func registerChecks(wlm workloadmeta.Component, tagger tagger.Component, cfg con
corecheckLoader.RegisterCheck(ksm.CheckName, ksm.Factory())
corecheckLoader.RegisterCheck(helm.CheckName, helm.Factory())
corecheckLoader.RegisterCheck(disk.CheckName, disk.Factory())
corecheckLoader.RegisterCheck(orchestrator.CheckName, orchestrator.Factory(wlm, cfg))
corecheckLoader.RegisterCheck(orchestrator.CheckName, orchestrator.Factory(wlm, cfg, tagger))
corecheckLoader.RegisterCheck(winproc.CheckName, winproc.Factory())
}
5 changes: 3 additions & 2 deletions cmd/dogstatsd/subcommands/start/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ func RunDogstatsdFct(cliParams *CLIParams, defaultConfPath string, defaultLogFil
eventplatformimpl.Module(eventplatformimpl.NewDisabledParams()),
eventplatformreceiverimpl.Module(),
hostnameimpl.Module(),
taggerimpl.OptionalModule(),
fx.Provide(tagger.NewTaggerParams),
taggerimpl.Module(),
// injecting the shared Serializer to FX until we migrate it to a prpoper component. This allows other
// already migrated components to request it.
fx.Provide(func(demuxInstance demultiplexer.Component) serializer.MetricSerializer {
Expand Down Expand Up @@ -191,7 +192,7 @@ func start(
server dogstatsdServer.Component,
_ defaultforwarder.Component,
wmeta optional.Option[workloadmeta.Component],
_ optional.Option[tagger.Component],
_ tagger.Component,
demultiplexer demultiplexer.Component,
_ runner.Component,
_ resources.Component,
Expand Down
2 changes: 2 additions & 0 deletions cmd/process-agent/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
log "github.com/DataDog/datadog-agent/comp/core/log/def"
"github.com/DataDog/datadog-agent/comp/core/settings"
"github.com/DataDog/datadog-agent/comp/core/status"
"github.com/DataDog/datadog-agent/comp/core/tagger"
workloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/def"
)

Expand All @@ -27,6 +28,7 @@ type APIServerDeps struct {
WorkloadMeta workloadmeta.Component
Status status.Component
Settings settings.Component
Tagger tagger.Component
}

func injectDeps(deps APIServerDeps, handler func(APIServerDeps, http.ResponseWriter, *http.Request)) http.HandlerFunc {
Expand Down
3 changes: 1 addition & 2 deletions cmd/process-agent/api/tagger_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import (
"encoding/json"
"net/http"

"github.com/DataDog/datadog-agent/comp/core/tagger"
httputils "github.com/DataDog/datadog-agent/pkg/util/http"
)

//nolint:revive // TODO(PROC) Fix revive linter
func getTaggerList(deps APIServerDeps, w http.ResponseWriter, _ *http.Request) {
response := tagger.List()
response := deps.Tagger.List()

jsonTags, err := json.Marshal(response)
if err != nil {
Expand Down
11 changes: 6 additions & 5 deletions cmd/serverless/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ func runAgent(tagger tagger.Component) {
lambdaInitMetricChan := make(chan *serverlessLogs.LambdaInitMetric)
//nolint:revive // TODO(SERV) Fix revive linter
coldStartSpanId := random.Random.Uint64()
metricAgent := startMetricAgent(serverlessDaemon, logChannel, lambdaInitMetricChan)
metricAgent := startMetricAgent(serverlessDaemon, logChannel, lambdaInitMetricChan, tagger)

// Concurrently start heavyweight features
var wg sync.WaitGroup
wg.Add(3)

go startTraceAgent(&wg, lambdaSpanChan, coldStartSpanId, serverlessDaemon)
go startTraceAgent(&wg, lambdaSpanChan, coldStartSpanId, serverlessDaemon, tagger)
go startOtlpAgent(&wg, metricAgent, serverlessDaemon)
go startTelemetryCollection(&wg, serverlessID, logChannel, serverlessDaemon, tagger)

Expand Down Expand Up @@ -205,9 +205,10 @@ func setupProxy(appsecProxyProcessor *httpsec.ProxyLifecycleProcessor, ta trace.
}
}

func startMetricAgent(serverlessDaemon *daemon.Daemon, logChannel chan *logConfig.ChannelMessage, lambdaInitMetricChan chan *serverlessLogs.LambdaInitMetric) *metrics.ServerlessMetricAgent {
func startMetricAgent(serverlessDaemon *daemon.Daemon, logChannel chan *logConfig.ChannelMessage, lambdaInitMetricChan chan *serverlessLogs.LambdaInitMetric, tagger tagger.Component) *metrics.ServerlessMetricAgent {
metricAgent := &metrics.ServerlessMetricAgent{
SketchesBucketOffset: time.Second * 10,
Tagger: tagger,
}
metricAgent.Start(daemon.FlushTimeout, &metrics.MetricConfig{}, &metrics.MetricDogStatsD{})
serverlessDaemon.SetStatsdServer(metricAgent)
Expand Down Expand Up @@ -334,9 +335,9 @@ func startOtlpAgent(wg *sync.WaitGroup, metricAgent *metrics.ServerlessMetricAge

}

func startTraceAgent(wg *sync.WaitGroup, lambdaSpanChan chan *pb.Span, coldStartSpanId uint64, serverlessDaemon *daemon.Daemon) {
func startTraceAgent(wg *sync.WaitGroup, lambdaSpanChan chan *pb.Span, coldStartSpanId uint64, serverlessDaemon *daemon.Daemon, tagger tagger.Component) {
defer wg.Done()
traceAgent := trace.StartServerlessTraceAgent(pkgconfigsetup.Datadog().GetBool("apm_config.enabled"), &trace.LoadConfig{Path: datadogConfigPath}, lambdaSpanChan, coldStartSpanId)
traceAgent := trace.StartServerlessTraceAgent(pkgconfigsetup.Datadog().GetBool("apm_config.enabled"), &trace.LoadConfig{Path: datadogConfigPath, Tagger: tagger}, lambdaSpanChan, coldStartSpanId)
serverlessDaemon.SetTraceAgent(traceAgent)
}

Expand Down
2 changes: 2 additions & 0 deletions cmd/systray/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/DataDog/datadog-agent/comp/core/config"
"github.com/DataDog/datadog-agent/comp/core/flare"
log "github.com/DataDog/datadog-agent/comp/core/log/def"
nooptagger "github.com/DataDog/datadog-agent/comp/core/tagger/noopimpl"
workloadmeta "github.com/DataDog/datadog-agent/comp/core/workloadmeta/def"
"github.com/DataDog/datadog-agent/comp/metadata/inventoryagent/inventoryagentimpl"
"github.com/DataDog/datadog-agent/comp/serializer/compression/compressionimpl"
Expand Down Expand Up @@ -110,6 +111,7 @@ func MakeCommand() *cobra.Command {
fx.Supply(optional.NewNoneOption[collector.Component]()),
compressionimpl.Module(),
diagnosesendermanagerimpl.Module(),
nooptagger.Module(),
authtokenimpl.Module(),
// We need inventoryagent to fill the status page generated by the flare.
inventoryagentimpl.Module(),
Expand Down
2 changes: 2 additions & 0 deletions cmd/trace-agent/subcommands/info/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
coreconfig "github.com/DataDog/datadog-agent/comp/core/config"
"github.com/DataDog/datadog-agent/comp/core/secrets"
"github.com/DataDog/datadog-agent/comp/core/secrets/secretsimpl"
nooptagger "github.com/DataDog/datadog-agent/comp/core/tagger/noopimpl"
"github.com/DataDog/datadog-agent/comp/trace/config"
"github.com/DataDog/datadog-agent/pkg/trace/info"
"github.com/DataDog/datadog-agent/pkg/util/fxutil"
Expand Down Expand Up @@ -45,6 +46,7 @@ func runTraceAgentInfoFct(params *subcommands.GlobalParams, fct interface{}) err
fx.Supply(secrets.NewEnabledParams()),
coreconfig.Module(),
secretsimpl.Module(),
nooptagger.Module(),
// TODO: (component)
// fx.Supply(logimpl.ForOneShot(params.LoggerName, "off", true)),
// log.Module(),
Expand Down
2 changes: 2 additions & 0 deletions comp/aggregator/bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/DataDog/datadog-agent/comp/aggregator/demultiplexer/demultiplexerimpl"
"github.com/DataDog/datadog-agent/comp/core"
nooptagger "github.com/DataDog/datadog-agent/comp/core/tagger/noopimpl"
"github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform/eventplatformimpl"
orchestratorForwarderImpl "github.com/DataDog/datadog-agent/comp/forwarder/orchestrator/orchestratorimpl"
Expand All @@ -24,5 +25,6 @@ func TestBundleDependencies(t *testing.T) {
defaultforwarder.MockModule(),
orchestratorForwarderImpl.MockModule(),
eventplatformimpl.MockModule(),
nooptagger.Module(),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/DataDog/datadog-agent/comp/core/config"
log "github.com/DataDog/datadog-agent/comp/core/log/def"
"github.com/DataDog/datadog-agent/comp/core/status"
"github.com/DataDog/datadog-agent/comp/core/tagger"
"github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform"
orchestratorforwarder "github.com/DataDog/datadog-agent/comp/forwarder/orchestrator"
Expand All @@ -42,6 +43,7 @@ type dependencies struct {
OrchestratorForwarder orchestratorforwarder.Component
EventPlatformForwarder eventplatform.Component
Compressor compression.Component
Tagger tagger.Component

Params Params
}
Expand Down Expand Up @@ -85,7 +87,9 @@ func newDemultiplexer(deps dependencies) (provides, error) {
options,
deps.EventPlatformForwarder,
deps.Compressor,
hostnameDetected)
deps.Tagger,
hostnameDetected,
)
demultiplexer := demultiplexer{
AgentDemultiplexer: agentDemultiplexer,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (

"github.com/DataDog/datadog-agent/comp/core"
"github.com/DataDog/datadog-agent/comp/core/status"
"github.com/DataDog/datadog-agent/comp/core/tagger"
"github.com/DataDog/datadog-agent/comp/core/tagger/taggerimpl"
"github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform/eventplatformimpl"
"github.com/DataDog/datadog-agent/comp/forwarder/orchestrator/orchestratorimpl"
Expand Down Expand Up @@ -53,12 +55,17 @@ func TestStatusOutPut(t *testing.T) {
}},
}

mockTagger := taggerimpl.SetupFakeTagger(t)

deps := fxutil.Test[dependencies](t, fx.Options(
core.MockBundle(),
compressionimpl.MockModule(),
defaultforwarder.MockModule(),
orchestratorimpl.MockModule(),
eventplatformimpl.MockModule(),
fx.Provide(func() tagger.Component {
return mockTagger
}),
fx.Supply(
Params{
continueOnMissingHostname: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/DataDog/datadog-agent/comp/core/hostname"
log "github.com/DataDog/datadog-agent/comp/core/log/def"
"github.com/DataDog/datadog-agent/comp/core/tagger/noopimpl"
"github.com/DataDog/datadog-agent/comp/forwarder/defaultforwarder"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform"
"github.com/DataDog/datadog-agent/comp/forwarder/eventplatform/eventplatformimpl"
Expand Down Expand Up @@ -184,6 +185,6 @@ func initTestAgentDemultiplexerWithFlushInterval(log log.Component, hostname hos
sharedForwarder := defaultforwarder.NewDefaultForwarder(pkgconfigsetup.Datadog(), log, sharedForwarderOptions)
orchestratorForwarder := optional.NewOption[defaultforwarder.Forwarder](defaultforwarder.NoopForwarder{})
eventPlatformForwarder := optional.NewOptionPtr[eventplatform.Forwarder](eventplatformimpl.NewNoopEventPlatformForwarder(hostname))
demux := aggregator.InitAndStartAgentDemultiplexer(log, sharedForwarder, &orchestratorForwarder, opts, eventPlatformForwarder, compressor, "hostname")
demux := aggregator.InitAndStartAgentDemultiplexer(log, sharedForwarder, &orchestratorForwarder, opts, eventPlatformForwarder, compressor, noopimpl.NewTaggerClient(), "hostname")
return NewTestAgentDemultiplexer(demux)
}
Loading

0 comments on commit 9097e0c

Please sign in to comment.