@whook/whook
Version:
Build strong and efficient REST web services.
18 lines • 643 B
JavaScript
import { name, autoService, location } from 'knifecycle';
export default location(name('apm', autoService(initAPM)), import.meta.url);
const noop = () => undefined;
/**
* Application monitoring service that simply log stringified contents.
* @function
* @param {Object} services
* The services to inject
* @param {Function} [services.log]
* A logging function
* @return {Promise<Object>}
* A promise of the apm service.
*/
async function initAPM({ log = noop, }) {
log('debug', '❤️ - Initializing the APM service.');
return (type, data) => log('info', type, JSON.stringify(data));
}
//# sourceMappingURL=apm.js.map