Put the caller, site and route on every request's span and log line
CI / full-gate (push) Successful in 3m23s
CI / full-gate (push) Successful in 3m23s
This commit is contained in:
@@ -132,11 +132,8 @@ test("emits a structured access-log line per request (the injected logger)", asy
|
||||
}
|
||||
assert.ok(line, "an access line is logged for the request");
|
||||
const rec = JSON.parse(line!);
|
||||
assert.equal(rec.method, "GET");
|
||||
assert.equal(rec.path, "/"); // pathname only — the ?q=… query is dropped (may carry tokens)
|
||||
assert.equal(rec.status, 200);
|
||||
assert.equal(rec["url.path"], "/"); // pathname only — the ?q=… query is dropped (may carry tokens)
|
||||
assert.equal(rec["service.name"], "plainpages");
|
||||
assert.equal(typeof rec.ms, "number");
|
||||
assert.ok(rec.requestId, "carries a requestId for log↔trace correlation");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user