From 732dfbee3fdf68a8cdfd5f931f0887a8090d9c09 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Tue, 17 Dec 2024 15:09:09 -0800 Subject: [PATCH] Create new moda datadog dashboard (#53673) --- config/moda/configuration/production/env.yaml | 3 +-- src/observability/lib/statsd.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config/moda/configuration/production/env.yaml b/config/moda/configuration/production/env.yaml index 6a9aa5468407..5674bd9f5c2a 100644 --- a/config/moda/configuration/production/env.yaml +++ b/config/moda/configuration/production/env.yaml @@ -1,8 +1,7 @@ data: + MODA_APP_NAME: docs-internal NODE_ENV: production NODE_OPTIONS: '--max-old-space-size=4096' PORT: '4000' ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko' - HEROKU_APP_NAME: help-docs - HEROKU_PRODUCTION_APP: 'true' RATE_LIMIT_MAX: '21' diff --git a/src/observability/lib/statsd.js b/src/observability/lib/statsd.js index 7b924ea3be93..c557b0163cb6 100644 --- a/src/observability/lib/statsd.js +++ b/src/observability/lib/statsd.js @@ -1,11 +1,15 @@ import StatsD from 'hot-shots' -const { HEROKU_APP_NAME, NODE_ENV, DD_API_KEY } = process.env +const { HEROKU_APP_NAME, NODE_ENV, DD_API_KEY, MODA_APP_NAME } = process.env const mock = Boolean(NODE_ENV === 'test' || !DD_API_KEY) -export const tags = ['app:docs', HEROKU_APP_NAME ? `heroku_app:${HEROKU_APP_NAME}` : false].filter( - Boolean, -) +// MODA_APP_NAME gets set when the deploy target is Moda +const modaApp = MODA_APP_NAME ? `moda_app_name:${MODA_APP_NAME}` : false +// HEROKU_APP_NAME gets set when the deploy target is Azure +const herokuApp = HEROKU_APP_NAME ? `heroku_app:${HEROKU_APP_NAME}` : false + +export const tags = ['app:docs', modaApp, herokuApp].filter(Boolean) + /** * @type {import('hot-shots').StatsD} */