import { ServiceContext , ServiceJSON } from '../typings' ; export const whoAmIHandler = ( { events , routes , } ) => ( ctx ) => { ctx . tracing ?. currentSpan . setOperationName ( 'builtin:whoami' ) ; ctx . status = 200 ; ctx . body = { events , routes , } ; ctx . set ( 'Cache-Control' , 'public, max-age=86400' ) ; } ; export const healthcheckHandler = ( { events , routes , } ) => ( ctx ) => { ctx . tracing ?. currentSpan . setOperationName ( 'builtin:healthcheck' ) ; ctx . status = 200 ; ctx . body = { events , routes , } ; } ; export const metricsLoggerHandler = ( ctx ) => { ctx . tracing ?. currentSpan . setOperationName ( 'builtin:metrics-logger' ) ; ctx . status = 200 ; ctx . body = ctx . metricsLogger . getSummaries ( ) ; } ;