Skip to content

Commit

Permalink
[chore] [exporter/datadog] add config value for datadog components (#…
Browse files Browse the repository at this point in the history
…36557)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
adds config value `logs_config.pipelines` to maintain compatibility with
upstream Datadog agent components

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Relates to DataDog/datadog-agent#31190

<!--Describe what testing was performed and which tests were added.-->
#### Testing
existing pipeliens
<!--Describe the documentation added.-->
#### Documentation
none, no change to user or api
<!--Please delete paragraphs that you did not use before submitting.-->
  • Loading branch information
jackgopack4 authored Dec 10, 2024
1 parent 5c6ffbb commit d9c7630
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion exporter/datadogexporter/agent_components.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

0 comments on commit d9c7630

Please sign in to comment.