docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a diagnostic tool that instruments an Express application to collect and report metadata about the layers (middleware, routers, and request handlers) executed during HTTP requests.
Create an Express application with instrumentation that:
/api/users that returns a list of users/api that contains the /users route/metrics endpoint that returns all collected layer metadata as JSONserver.js - Express application with routes, middleware, and the /metrics endpointserver.test.js - Tests to verify layer metadata collection/api/users triggers metadata collection for all layers in the request pipeline @test/metrics endpoint returns an array of layer metadata objects, each containing name, type, and route properties @testconst express = require('express');
/**
* Creates and configures an Express application with instrumentation
* @returns {express.Application} Configured Express app
*/
function createApp() {
// Returns Express app with routes and instrumentation
}
module.exports = { createApp };Provides the web application framework.
Provides instrumentation capabilities for Express applications to enable automatic layer metadata extraction and observability.