Skip to content

Commit 732dfbe

Browse files
authored
Create new moda datadog dashboard (#53673)
1 parent 4ec662e commit 732dfbe

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
data:
2+
MODA_APP_NAME: docs-internal
23
NODE_ENV: production
34
NODE_OPTIONS: '--max-old-space-size=4096'
45
PORT: '4000'
56
ENABLED_LANGUAGES: 'en,zh,es,pt,ru,ja,fr,de,ko'
6-
HEROKU_APP_NAME: help-docs
7-
HEROKU_PRODUCTION_APP: 'true'
87
RATE_LIMIT_MAX: '21'

src/observability/lib/statsd.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import StatsD from 'hot-shots'
22

3-
const { HEROKU_APP_NAME, NODE_ENV, DD_API_KEY } = process.env
3+
const { HEROKU_APP_NAME, NODE_ENV, DD_API_KEY, MODA_APP_NAME } = process.env
44
const mock = Boolean(NODE_ENV === 'test' || !DD_API_KEY)
55

6-
export const tags = ['app:docs', HEROKU_APP_NAME ? `heroku_app:${HEROKU_APP_NAME}` : false].filter(
7-
Boolean,
8-
)
6+
// MODA_APP_NAME gets set when the deploy target is Moda
7+
const modaApp = MODA_APP_NAME ? `moda_app_name:${MODA_APP_NAME}` : false
8+
// HEROKU_APP_NAME gets set when the deploy target is Azure
9+
const herokuApp = HEROKU_APP_NAME ? `heroku_app:${HEROKU_APP_NAME}` : false
10+
11+
export const tags = ['app:docs', modaApp, herokuApp].filter(Boolean)
12+
913
/**
1014
* @type {import('hot-shots').StatsD}
1115
*/

0 commit comments

Comments
 (0)