Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

feature: update prom-client #123

Merged
merged 8 commits into from
May 22, 2020
Merged

feature: update prom-client #123

merged 8 commits into from
May 22, 2020

Conversation

PixnBits
Copy link
Contributor

@PixnBits PixnBits commented Apr 28, 2020

Description

prom-client 12.x added more metrics which cover those that we added via prometheus-gc-stats. Additionally, prom-client is making use of the new perf_hooks API in Node.JS removing the need for gc-stats (binary dep). This, like #45 will help reduce potential install problems and binary incompatibilities (ex: switching base docker images).

Motivation and Context

This keeps One App up-to-date and reduces installation complexity.

How Has This Been Tested?

Integration tests have been added showing the metric names exposed.

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)

Probably a breaking change as the metric names change (and reducing names but increasing labels for some of that information). I'm hoping this can be added before v5.0.0 is officially released.

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • These changes should be applied to a maintenance branch.
  • This change requires cross browser checks.
  • Performance tests should be ran against the server prior to merging.
  • This change impacts caching for client browsers.
  • This change impacts HTTP headers.
  • This change adds additional environment variable requirements for One App users.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using One App?

This reduces one of the two native dependencies and so hopefully makes installation easier.

@PixnBits PixnBits requested review from a team as code owners April 28, 2020 22:56
@@ -42,6 +42,44 @@ Object {
}
`;

exports[`Tests that require Docker setup one-app successfully started metrics has all metrics 1`] = `
Copy link
Contributor Author

@PixnBits PixnBits Apr 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd encourage looking at the diff of this file across the two commits to see the difference in metric names

@oneamexbot
Copy link
Contributor

oneamexbot commented Apr 28, 2020

📊 Bundle Size Report

file name size on disk gzip
app.js 113.2KB 31.6KB
runtime.js 15KB 5.4KB
vendors.js 128.4KB 38KB
app~vendors.js 433.9KB 112.5KB
service-worker-client.js 16.9KB 5.2KB
legacy/app.js 120KB 33.2KB
legacy/runtime.js 15KB 5.4KB
legacy/vendors.js 163.4KB 44.9KB
legacy/app~vendors.js 442.2KB 114.7KB
legacy/service-worker-client.js 17.4KB 5.4KB

Generated by 🚫 dangerJS against 698e5b1

"nodejs_eventloop_lag_min_seconds",
"nodejs_eventloop_lag_p50_seconds",
"nodejs_eventloop_lag_p90_seconds",
"nodejs_eventloop_lag_p99_seconds"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from Travis:

    -   "nodejs_eventloop_lag_p99_seconds"
    +   "nodejs_eventloop_lag_p99_seconds",

🤦

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as there aren't any reviews yet and we might want to keep the two commits separate I've replaced 39b35b5 with 3b23458 to reduce the need for squashing later
(might be moot if the metric test isn't desired on it's own, but just in case)

@@ -14,6 +14,7 @@ services:
image: one-app:at-test
expose:
- "8443"
- "3005"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it is the sample, but what expose 3005 now?

@@ -46,7 +46,8 @@ const setUpTestRunner = async ({ oneAppLocalPortToUse } = {}) => {
'one-app': {
ports: [
`${oneAppLocalPortToUse}:8443`,
],
oneAppMetricsLocalPortToUse ? `${oneAppMetricsLocalPortToUse}:3005` : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JamesSingleton the 3005 port has to be exposed because it is mapped here like from ramdomPort to 3005

infoxicator
infoxicator previously approved these changes May 5, 2020
@infoxicator infoxicator dismissed stale reviews from 10xLaCroixDrinker and themself via 8006fdc May 5, 2020 12:29
infoxicator
infoxicator previously approved these changes May 5, 2020
__tests__/integration/one-app.spec.js Outdated Show resolved Hide resolved
mtomcal
mtomcal previously approved these changes May 13, 2020
@PixnBits
Copy link
Contributor Author

    Snapshot name: `Tests that require Docker setup one-app successfully started metrics has all metrics 1`

    - Snapshot
    + Received

    @@ -1,6 +1,8 @@
      Array [
    +   "circuit",
    +   "circuit_perf",

ah, #111 was merged! I ran the tests before rebasing but not after 🤦‍♂️

@infoxicator
Copy link
Contributor

    Snapshot name: `Tests that require Docker setup one-app successfully started metrics has all metrics 1`

    - Snapshot
    + Received

    @@ -1,6 +1,8 @@
      Array [
    +   "circuit",
    +   "circuit_perf",

ah, #111 was merged! I ran the tests before rebasing but not after 🤦‍♂️

I thought I updated it but, might have messed up because I did it from my fork

@infoxicator infoxicator merged commit 79f0e68 into master May 22, 2020
@infoxicator infoxicator deleted the feature/update-prom-client branch May 22, 2020 16:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants