-
- Downloads

PaaS-friendly metrics (#4874)

* prom-client JSON to InfluxDB line protocol converter * Converts a metric with separate names * prom-client JSON to InfluxDB line protocol (version 2) converter * Server has instance id * Read the instance id from an environment variable * More unit tests for instance-metadata * Log instance id * Push influx metrics * INSTANCE_ID with dyno metadata * Prepare influx metrics in one place * Influx metrics endpoint should return metrics * More readable tests * Env added to instance metadata * hostname as an instance label value * HEROKU_DYNO_ID as an instance id for heroku * Instance env can be set by env variable * HEROKU_APP_NAME as an instance env * Log instance metadata as a JSON * Typo fix * Code refactoring in tests * wait-for-expect dev dependency added * Test for pushing metrics * Test for pushing metrics * Use basic authentication for pushing metrics * intervalSeconds=2 for development env * Using existing methods * TODOs removed * Schema for influx credentials * Influx config removed from config files * Require username and password when influx metrics are enabled * Unused args removed * pushing component should log errors * Speed up tests * should log error responses * InstanceMetadata class replaces by simple object * Influx metrics can be configuredd by env variables * Use application label name instead of service * Unused code removed * Integration test for prom-client and converter * metrics.influx.enabled configuration option added * Improved influx configuration schema * instanceMetadata validation * Typo fix * Default value for env * metrics.infux.hostnameAsAInstanceId added * should add hostname as an instance label when hostnameAsAInstanceId is enabled * Default values for influx configuration * flatMap is not available in Node.js 9.4 * Env vars removed from Procfile * Better instance metadata values in tests * Typo fix * lodash.groupby added to prod dependencies * Allow other keys in private config * Missing test - should allow other private keys when influx metrics are enabled * Missing test - should require private metrics config when influx configuration is enabled * log.error instead of console.log * metrics.influx.uri -> metrics.influx.url * Unused arguments removed * async removed * promisify sendMetrics * Allow to disable prometheus metrics * Create test server with custom config * 'metrics-influx' resource removed * 'metrics-influx' resource removed * Private config schema flattened out * Extra code removed in Prometheus tests * promisify moved outside of the class * Do not throw errors from got in a specific test * hostnameAliases added * instanceIdFrom added * instanceIdEnvVarName added * envLabel added to schema * instanceMetadata is not used by InfluxMetrics * Instance metadata removed * hostnameAsAnInstanceId removed * A comment added * waitForExpect removed * Unused code removed
Showing
- config/custom-environment-variables.yml 11 additions, 0 deletionsconfig/custom-environment-variables.yml
- config/default.yml 5 additions, 1 deletionconfig/default.yml
- config/shields-io-production.yml 1 addition, 0 deletionsconfig/shields-io-production.yml
- core/server/in-process-server-test-helpers.js 7 additions, 12 deletionscore/server/in-process-server-test-helpers.js
- core/server/influx-metrics.js 86 additions, 0 deletionscore/server/influx-metrics.js
- core/server/influx-metrics.spec.js 177 additions, 0 deletionscore/server/influx-metrics.spec.js
- core/server/instance-id-generator.js 10 additions, 0 deletionscore/server/instance-id-generator.js
- core/server/metrics/format-converters.js 27 additions, 0 deletionscore/server/metrics/format-converters.js
- core/server/metrics/format-converters.spec.js 217 additions, 0 deletionscore/server/metrics/format-converters.spec.js
- core/server/prometheus-metrics.js 8 additions, 2 deletionscore/server/prometheus-metrics.js
- core/server/prometheus-metrics.spec.js 7 additions, 7 deletionscore/server/prometheus-metrics.spec.js
- core/server/server.js 80 additions, 13 deletionscore/server/server.js
- core/server/server.spec.js 302 additions, 132 deletionscore/server/server.spec.js
- core/service-test-runner/cli.js 8 additions, 2 deletionscore/service-test-runner/cli.js
- package-lock.json 7 additions, 2 deletionspackage-lock.json
- package.json 2 additions, 1 deletionpackage.json
Loading
Please register or sign in to comment