Skip to content

Commit

Permalink
[DJM] Enable DSM on DD_DATA_STREAMS_ENABLED (#34688)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul Laffon <paul.laffon@datadoghq.com>
  • Loading branch information
aboitreaud and paul-laffon-dd authored Mar 4, 2025
1 parent ce240d1 commit a501def
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/fleet/installer/setup/djm/emr.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ func SetupEmr(s *common.Setup) error {
s.Config.DatadogYAML.DJM.Enabled = true
s.Config.InjectTracerYAML.AdditionalEnvironmentVariables = tracerEnvConfigEmr

if os.Getenv("DD_DATA_STREAMS_ENABLED") == "true" {
s.Out.WriteString("Propagating variable DD_DATA_STREAMS_ENABLED=true to tracer configuration\n")
DSMEnabled := common.InjectTracerConfigEnvVar{
Key: "DD_DATA_STREAMS_ENABLED",
Value: "true",
}
s.Config.InjectTracerYAML.AdditionalEnvironmentVariables = append(tracerEnvConfigEmr, DSMEnabled)
}

// Ensure tags are always attached with the metrics
s.Config.DatadogYAML.ExpectedTagsDuration = "10m"
isMaster, clusterName, err := setupCommonEmrHostTags(s)
Expand All @@ -100,7 +109,6 @@ func SetupEmr(s *common.Setup) error {
if os.Getenv("DD_EMR_LOGS_ENABLED") == "true" {
s.Out.WriteString("Enabling EMR logs collection based on env variable DD_EMR_LOGS_ENABLED=true\n")
enableEmrLogs(s)

} else {
s.Out.WriteString("EMR logs collection not enabled. To enable it, set DD_EMR_LOGS_ENABLED=true\n")
}
Expand Down

0 comments on commit a501def

Please sign in to comment.