Skip to content

Commit

Permalink
Dropped metric as we don't need to spplied
Browse files Browse the repository at this point in the history
  • Loading branch information
chainat-byb committed Sep 27, 2024
1 parent 244742f commit 1626331
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion samples/metricLogger1.sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const yourHandler = async () => {

// 4) Send the metric to Mezmo, this will be logged as a JSON object
// Should send once per execution to avoid duplicate metric
metricLogger.sendMetric(metric);
metricLogger.sendMetric();
};

// Example if you use Metric Logger in your handler
Expand Down
2 changes: 1 addition & 1 deletion samples/metricLogger2.sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const yourHandler = async () => {

// 4) Send the metric to Mezmo, this will be logged as a JSON object
// Should send once per execution to avoid duplicate metric
metricLogger.sendMetric(metric);
metricLogger.sendMetric();
};

// Example if you use Metric Logger in your handler
Expand Down
2 changes: 1 addition & 1 deletion src/MetricLogger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class MetricLogger<T> {
* @param metric
* @param stringifyMetric
*/
sendMetric(metric: T, stringifyMetric = true): void {
sendMetric(metric: T = this._metric, stringifyMetric = true): void {
if (!this._isTest) {
const metricToSend = stringifyMetric ? JSON.stringify(metric) : metric;
this._logger.info(metricToSend);
Expand Down

0 comments on commit 1626331

Please sign in to comment.