Skip to content

Commit

Permalink
Merge pull request #35695 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Dec 18, 2024
2 parents 6cf3f73 + 732dfbe commit 49859bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 1 addition & 2 deletions config/moda/configuration/production/env.yaml
Original file line number Diff line number Diff line change
@@ -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'
12 changes: 8 additions & 4 deletions src/observability/lib/statsd.js
Original file line number Diff line number Diff line change
@@ -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}
*/
Expand Down

0 comments on commit 49859bf

Please sign in to comment.