Skip to content

Commit

Permalink
fix(ratelimit/client.ts): pass metrics object to connectAgent function
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Jun 22, 2024
1 parent 163cc05 commit c884272
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions apps/api/src/pkg/ratelimit/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ export class DurableRateLimiter implements RateLimiter {
this.metrics = opts.metrics;
this.cache = opts.cache;
if (opts.agent) {
this.agent = connectAgent({
baseUrl: opts.agent.url,
token: opts.agent.token,
});
this.agent = connectAgent(
{
baseUrl: opts.agent.url,
token: opts.agent.token,
},
this.metrics,
);
}
}

Expand Down

0 comments on commit c884272

Please sign in to comment.