docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how well the engineer uses @opentelemetry/instrumentation-express in conjunction with @opentelemetry/instrumentation-http to capture distributed traces from an Express application. The focus is on proper setup of both instrumentations and ensuring they work together to enrich HTTP spans with Express-specific route information.",
"type": "weighted_checklist",
"checklist": [
{
"name": "HTTP Instrumentation Setup",
"description": "Uses @opentelemetry/instrumentation-http's HttpInstrumentation class to enable HTTP request tracing. This is required for Express instrumentation to work properly as it relies on HTTP instrumentation for base request/response tracing.",
"max_score": 25
},
{
"name": "Express Instrumentation Setup",
"description": "Uses @opentelemetry/instrumentation-express's ExpressInstrumentation class to enable Express-specific tracing for middleware and routes.",
"max_score": 25
},
{
"name": "Instrumentation Registration",
"description": "Registers both HttpInstrumentation and ExpressInstrumentation with the OpenTelemetry SDK (e.g., using NodeSDK's instrumentations configuration or registerInstrumentations). Both instrumentations must be registered before the Express app is created.",
"max_score": 20
},
{
"name": "Span Exporter Configuration",
"description": "Configures an in-memory span exporter (InMemorySpanExporter from @opentelemetry/sdk-trace-base) with a span processor (SimpleSpanProcessor or BatchSpanProcessor) to capture trace data for testing purposes.",
"max_score": 15
},
{
"name": "Route Tracing Verification",
"description": "Implementation allows verification that traces include Express route information (http.route attribute) for parameterized routes like /users/:id, demonstrating that Express instrumentation successfully enriches HTTP spans.",
"max_score": 15
}
]
}