Skip to content

Commit

Permalink
prettier fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manav2401 committed Sep 20, 2023
1 parent 8b398cb commit e32bf4c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/express/commands/setup-datadog.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ export async function setupDatadog() {
await runScpCommand(src, dest, maxRetries)

// Install otel collector using the script
command = "sudo bash ~/install-otelcol-contrib.sh"
command = 'sudo bash ~/install-otelcol-contrib.sh'
await runSshCommand(`${user}@${host}`, command, maxRetries)

// Set the datadog api key in the otel config
console.log('📍Setting up datadog api key in otel config and copying the config')
console.log(
'📍Setting up datadog api key in otel config and copying the config'
)
const otelConfig = await yaml.load(
fs.readFileSync('./otel-config-dd.yaml', 'utf8'),
undefined
Expand All @@ -115,16 +117,17 @@ export async function setupDatadog() {
dest = `${user}@${host}:~/otel-config-dd.yaml`
await runScpCommand(src, dest, maxRetries)

command = "sudo mv ~/otel-config-dd.yaml /etc/otelcol-contrib/config.yaml"
command = 'sudo mv ~/otel-config-dd.yaml /etc/otelcol-contrib/config.yaml'
await runSshCommand(`${user}@${host}`, command, maxRetries)

// Restart the otel service
console.log('📍Restarting the otel service')
command = "sudo systemctl daemon-reload && sudo service otelcol-contrib restart"
command =
'sudo systemctl daemon-reload && sudo service otelcol-contrib restart'
await runSshCommand(`${user}@${host}`, command, maxRetries)

// Remove the installation script
command = "rm ~/install-otelcol-contrib.sh"
command = 'rm ~/install-otelcol-contrib.sh'
await runSshCommand(`${user}@${host}`, command, maxRetries)

// revert dd api key
Expand Down

0 comments on commit e32bf4c

Please sign in to comment.