Skip to content

Commit

Permalink
Display APP_VERSION and APP_VERSION_RELEASE in /api/status
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadorequest committed Apr 26, 2020
1 parent 78ffd7f commit cee3e6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/api/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const status = async (req: NowRequest, res: NowResponse): Promise<void> =
configureReq(req);

res.json({
version: process.env.APP_VERSION,
release: process.env.APP_VERSION_RELEASE,
nodejs: process.version,
nodejsAWS: process.env.AWS_EXECUTION_ENV,
regionNOW: process.env.NOW_REGION,
Expand Down
1 change: 1 addition & 0 deletions src/utils/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if (!process.env.SENTRY_DSN && process.env.NODE_ENV !== 'test') {

// Scope configured by default, subsequent calls to "configureScope" will add additional data
Sentry.configureScope((scope) => { // See https://www.npmjs.com/package/@sentry/node
scope.setTag('appVersion', process.env.APP_VERSION);
scope.setTag('nodejs', process.version);
scope.setTag('nodejsAWS', process.env.AWS_EXECUTION_ENV || null); // Optional - Available on production environment only
scope.setTag('memory', process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE || null); // Optional - Available on production environment only
Expand Down

0 comments on commit cee3e6e

Please sign in to comment.