Skip to content

Commit

Permalink
feat: add alert and warning to module.exports
Browse files Browse the repository at this point in the history
  • Loading branch information
hugokishi committed Mar 17, 2023
1 parent fbb5bbb commit abaf39a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
export type PrometheusMetricsExporter = {
/**
* ! Use this function if you want to export the logs without any kind of alert
*/
Alert: (message: string) => void;
/**
* ! Use this function if you want to export the logs and warn of a possible error
*/
Warning: (message: string) => void;
};
/**
* ! Use this function if you want to export the logs without any kind of alert
*/
export function Alert(message: string): void;

/**
* ! Use this function if you want to export the logs and warn of a possible error
*/
export function Warning(message: string): void;

/**
* ! Start a new Gauge in prom-client
*/
export function InitElvenAlertManager(): PrometheusMetricsExporter;
export function InitElvenAlertManager(): void;
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ const InitElvenAlertManager = () => {
};
};

module.exports = { InitElvenAlertManager };
module.exports = { InitElvenAlertManager, Alert, Warning };

0 comments on commit abaf39a

Please sign in to comment.