@tramvai/module-metrics 2.50.0 → 2.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/server.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { getUrlAndOptions } from './request/createRequestWithMetrics';
1
2
  export * from '@tramvai/tokens-metrics';
2
3
  export declare class MetricsModule {
3
4
  }
package/lib/server.es.js CHANGED
@@ -68,7 +68,7 @@ const getUrlAndOptions = (args) => {
68
68
  }
69
69
  const parsedUrl = new URL(url);
70
70
  const urlWOQuery = parsedUrl.origin + parsedUrl.pathname;
71
- return [urlWOQuery, options || {}];
71
+ return [urlWOQuery, options || {}, parsedUrl];
72
72
  };
73
73
  // in seconds
74
74
  const getDuration = (current, prev) =>
@@ -560,4 +560,4 @@ MetricsModule = __decorate([
560
560
  })
561
561
  ], MetricsModule);
562
562
 
563
- export { MetricsModule };
563
+ export { MetricsModule, getUrlAndOptions };
package/lib/server.js CHANGED
@@ -81,7 +81,7 @@ const getUrlAndOptions = (args) => {
81
81
  }
82
82
  const parsedUrl = new URL(url$1);
83
83
  const urlWOQuery = parsedUrl.origin + parsedUrl.pathname;
84
- return [urlWOQuery, options || {}];
84
+ return [urlWOQuery, options || {}, parsedUrl];
85
85
  };
86
86
  // in seconds
87
87
  const getDuration = (current, prev) =>
@@ -573,6 +573,7 @@ exports.MetricsModule = tslib.__decorate([
573
573
  })
574
574
  ], exports.MetricsModule);
575
575
 
576
+ exports.getUrlAndOptions = getUrlAndOptions;
576
577
  Object.keys(tokensMetrics).forEach(function (k) {
577
578
  if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
578
579
  enumerable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-metrics",
3
- "version": "2.50.0",
3
+ "version": "2.51.0",
4
4
  "description": "",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -19,15 +19,15 @@
19
19
  "build-for-publish": "true"
20
20
  },
21
21
  "dependencies": {
22
- "@tramvai/core": "2.50.0",
23
- "@tramvai/tokens-server": "2.50.0",
24
- "@tramvai/tokens-server-private": "2.50.0",
25
- "@tramvai/tokens-metrics": "2.50.0",
26
- "@tramvai/tokens-router": "2.50.0",
27
- "@tramvai/module-common": "2.50.0",
28
- "@tramvai/tokens-http-client": "2.50.0",
29
- "@tramvai/state": "2.50.0",
30
- "@tramvai/papi": "2.50.0",
22
+ "@tramvai/core": "2.51.0",
23
+ "@tramvai/tokens-server": "2.51.0",
24
+ "@tramvai/tokens-server-private": "2.51.0",
25
+ "@tramvai/tokens-metrics": "2.51.0",
26
+ "@tramvai/tokens-router": "2.51.0",
27
+ "@tramvai/module-common": "2.51.0",
28
+ "@tramvai/tokens-http-client": "2.51.0",
29
+ "@tramvai/state": "2.51.0",
30
+ "@tramvai/papi": "2.51.0",
31
31
  "@tinkoff/measure-fastify-requests": "0.1.6",
32
32
  "@tinkoff/monkeypatch": "2.0.3",
33
33
  "@tinkoff/url": "0.8.4",