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 to capture and access route path information. The focus is on proper initialization of OpenTelemetry instrumentation, accessing the http.route semantic convention attribute from spans, and correctly retrieving route templates rather than actual request paths.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Instrumentation Initialization",
"description": "Uses ExpressInstrumentation from @opentelemetry/instrumentation-express and properly registers it with a NodeTracerProvider or similar OpenTelemetry setup to enable automatic route tracking",
"max_score": 25
},
{
"name": "Span Access",
"description": "Uses the @opentelemetry/api to access the active span during request processing (e.g., using trace.getActiveSpan() or similar API)",
"max_score": 20
},
{
"name": "Route Attribute Retrieval",
"description": "Retrieves the http.route attribute from the span using span.attributes or similar mechanism to access the route template set by the instrumentation",
"max_score": 30
},
{
"name": "Parameterized Route Handling",
"description": "Solution correctly returns route templates with parameters (e.g., '/users/:userId') rather than the actual request path (e.g., '/users/123') for parameterized routes",
"max_score": 15
},
{
"name": "Nested Router Support",
"description": "Solution correctly captures full route paths for nested routers, combining the mount path with the internal route (e.g., '/api/products/:id' for a router mounted at '/api' with route '/products/:id')",
"max_score": 10
}
]
}