-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Render and ECS (#22)
* Add support for Render and ECS * Include config info in reports
- Loading branch information
Showing
14 changed files
with
3,392 additions
and
6,800 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import Api from './lib/api' | ||
import defaultConfig from './lib/default-config' | ||
import defaultConfigFunction from './lib/default-config' | ||
import mergeConfig from './lib/merge-config' | ||
import logger from './lib/logger' | ||
import Metric from './lib/metric' | ||
import MetricsStore from './lib/metrics-store' | ||
import Report from './lib/report' | ||
import Reporter from './lib/reporter' | ||
|
||
export { Api, defaultConfig, mergeConfig, logger, Metric, MetricsStore, Report, Reporter } | ||
const defaultConfig = defaultConfigFunction() | ||
|
||
export { Api, mergeConfig, logger, Metric, MetricsStore, Report, Reporter, defaultConfig } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,28 @@ | ||
import getLogger from './logger' | ||
|
||
const defaultLogLevel = process.env.JUDOSCALE_LOG_LEVEL || 'info' | ||
|
||
export default { | ||
version: '1.1.0', | ||
api_base_url: process.env.JUDOSCALE_URL, | ||
log_level: defaultLogLevel, | ||
dyno: process.env.DYNO, | ||
report_interval_seconds: 10, | ||
now: null, | ||
logger: getLogger(defaultLogLevel), | ||
export default function () { | ||
const defaultLogLevel = process.env.JUDOSCALE_LOG_LEVEL || 'info' | ||
|
||
let apiBaseUrl = process.env.JUDOSCALE_URL | ||
let containerID = process.env.DYNO | ||
|
||
if (process.env.RENDER_INSTANCE_ID) { | ||
containerID = process.env.RENDER_INSTANCE_ID.replace(process.env.RENDER_SERVICE_ID, '').replace('-', '') | ||
apiBaseUrl = `https://adapter.judoscale.com/api/${process.env.RENDER_SERVICE_ID}` | ||
} | ||
|
||
if (process.env.ECS_CONTAINER_METADATA_URI) { | ||
const parts = process.env.ECS_CONTAINER_METADATA_URI.split('/') | ||
containerID = parts[parts.length - 1] | ||
} | ||
|
||
return { | ||
version: '1.1.0', | ||
api_base_url: apiBaseUrl, | ||
log_level: defaultLogLevel, | ||
container: containerID, | ||
report_interval_seconds: 10, | ||
now: null, | ||
logger: getLogger(defaultLogLevel), | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: npm run start | ||
web: yarn start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
cfa3fe2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report for
./node-core
Test suite run success
38 tests passing in 6 suites.
Report generated by 🧪jest coverage report action from cfa3fe2
cfa3fe2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage report for
./express
Test suite run success
17 tests passing in 4 suites.
Report generated by 🧪jest coverage report action from cfa3fe2