1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var Tag;
|
4 | (function (Tag) {
|
5 | Tag["Path"] = "path";
|
6 | Tag["RequestMethod"] = "request_method";
|
7 | Tag["ResponseCode"] = "response_code";
|
8 | Tag["ResponseType"] = "response_type";
|
9 | })(Tag = exports.Tag || (exports.Tag = {}));
|
10 | function tagsForRequest(ctx) {
|
11 | var _a;
|
12 | return _a = {},
|
13 | _a[Tag.Path] = ctx.path,
|
14 | _a[Tag.RequestMethod] = ctx.request.method,
|
15 | _a;
|
16 | }
|
17 | exports.tagsForRequest = tagsForRequest;
|
18 | function tagsForResponse(ctx) {
|
19 | var _a;
|
20 | return _a = {},
|
21 | _a[Tag.ResponseCode] = "" + ctx.response.status,
|
22 | _a[Tag.ResponseType] = Math.floor(ctx.response.status / 100) + "xx",
|
23 | _a;
|
24 | }
|
25 | exports.tagsForResponse = tagsForResponse;
|