Skip to content

Commit 62a28cc

Browse files
fix
1 parent 3c956b5 commit 62a28cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wtp/locationSelector.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const logger = require('../logger').logger;
88

99
const GET_LOCATIONS = 'http://www.webpagetest.org/getLocations.php?f=json';
1010

11-
const WstMeter = opentelemetry.metrics.getMeter();
11+
const WstMeter = opentelemetry.metrics.getMeter("web-speed-test-server");
1212
const locationMetrics = {
1313
total: WstMeter.createGauge('location.total'),
1414
lastUpdate: WstMeter.createGauge('location.last_update'),
@@ -132,8 +132,8 @@ class LocationSelector {
132132
this.lastUpdated = Date.now();
133133

134134
// telemetry
135-
locationMetrics.total = this.cachedAllLocations.length;
136-
locationMetrics.lastUpdate = this.lastUpdated;
135+
locationMetrics.total.record(this.cachedAllLocations.length);
136+
locationMetrics.lastUpdate.record(this.lastUpdated);
137137
this.cachedAllLocations.forEach((loc) => {
138138
let labels = {location: loc.location};
139139

0 commit comments

Comments
 (0)