Skip to content

Commit

Permalink
Remove unused argument from Reporter#start
Browse files Browse the repository at this point in the history
The reporter does not need access to the metrics store—that's the responsibility of the collectors, particularly the web metrics collector.
  • Loading branch information
adamlogic committed May 20, 2024
1 parent c2819f5 commit 9610b08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion express/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default (config) => {
const collectors = [new WebMetricsCollector(store)]
const reporter = new Reporter()

reporter.start(finalConfig, store, collectors, Adapter)
reporter.start(finalConfig, collectors, Adapter)

return ({ headers }, _res, next) => {
const now = finalConfig.now || new Date()
Expand Down
2 changes: 1 addition & 1 deletion fastify/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function judoscaleFastify(fastify, options) {
const collectors = [new WebMetricsCollector(metricsStore)]
const reporter = new Reporter()

reporter.start(finalConfig, metricsStore, collectors, Adapter)
reporter.start(finalConfig, collectors, Adapter)

fastify.addHook('onRequest', async (request, _reply) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion node-core/src/lib/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Reporter {
this.started = this.hasStarted() || false
}

start(config, store, collectors, Adapter) {
start(config, collectors, Adapter) {
if (!this.hasStarted()) {
this.started = true

Expand Down

0 comments on commit 9610b08

Please sign in to comment.