Skip to content

Commit

Permalink
collect logs on master+worker
Browse files Browse the repository at this point in the history
  • Loading branch information
aboitreaud committed Jan 21, 2025
1 parent 770b009 commit c03aa13
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions pkg/fleet/installer/setup/djm/dataproc.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ var (
Value: "true",
},
}
dataprocLogs = []common.IntegrationConfigLogs{
{
Type: "file",
Path: "/var/log/hadoop-yarn/containers/*/*/stdout",
Source: "worker_logs",
Service: "hadoop-yarn",
Tags: "log_source:stdout",
},
{
Type: "file",
Path: "/var/log/hadoop-yarn/containers/*/*/stderr",
Source: "worker_logs",
Service: "hadoop-yarn",
Tags: "log_source:stderr",
},
}
)

// SetupDataproc sets up the DJM environment on Dataproc
Expand Down Expand Up @@ -70,6 +86,13 @@ func SetupDataproc(s *common.Setup) error {
if isMaster == "true" {
setupResourceManager(s, clusterName)
}
// Add logs config to both Resource Manager and Workers
var sparkIntegration common.IntegrationConfig
if os.Getenv("DD_LOGS_ENABLED") == "true" {
s.Config.DatadogYAML.LogsEnabled = true
sparkIntegration.Logs = dataprocLogs
}
s.Config.IntegrationConfigs["spark.d/conf.yaml"] = sparkIntegration
return nil
}

Expand Down

0 comments on commit c03aa13

Please sign in to comment.