From d9c7630a85801998db5c576e8b9a87e55752cfa3 Mon Sep 17 00:00:00 2001 From: "John L. Peterson (Jack)" Date: Tue, 10 Dec 2024 05:30:25 -0500 Subject: [PATCH] [chore] [exporter/datadog] add config value for datadog components (#36557) #### Description adds config value `logs_config.pipelines` to maintain compatibility with upstream Datadog agent components #### Link to tracking issue Relates to https://github.com/DataDog/datadog-agent/pull/31190 #### Testing existing pipeliens #### Documentation none, no change to user or api --- exporter/datadogexporter/agent_components.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/exporter/datadogexporter/agent_components.go b/exporter/datadogexporter/agent_components.go index a925f097a36d..2025422d95c5 100644 --- a/exporter/datadogexporter/agent_components.go +++ b/exporter/datadogexporter/agent_components.go @@ -4,6 +4,7 @@ package datadogexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter" import ( + "runtime" "strings" coreconfig "github.com/DataDog/datadog-agent/comp/core/config" @@ -46,6 +47,8 @@ func newConfigComponent(set component.TelemetrySettings, cfg *Config) coreconfig pkgconfig.Set("logs_config.stop_grace_period", 30, pkgconfigmodel.SourceDefault) pkgconfig.Set("logs_config.use_v2_api", true, pkgconfigmodel.SourceDefault) pkgconfig.SetKnown("logs_config.dev_mode_no_ssl") - + // add logs config pipelines config value, see https://github.com/DataDog/datadog-agent/pull/31190 + logsPipelines := min(4, runtime.GOMAXPROCS(0)) + pkgconfig.Set("logs_config.pipelines", logsPipelines, pkgconfigmodel.SourceDefault) return pkgconfig }