@tramvai/module-metrics 2.40.0 → 2.45.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.
@@ -1,5 +1,5 @@
1
1
  import { Gauge, Histogram, Summary } from '@tinkoff/metrics-noop';
2
- declare type Labels<T extends string> = Record<T, string | number>;
2
+ type Labels<T extends string> = Record<T, string | number>;
3
3
  export declare function startMeasurePerformance<T extends string>(name: string, startLabels?: Labels<T>): (endLabels?: Labels<T>) => void;
4
4
  interface PerfMetricConfigurator {
5
5
  name: string;
@@ -2,7 +2,7 @@ interface IndexObject<T> {
2
2
  [key: string]: IndexObject<T> | T;
3
3
  value?: T;
4
4
  }
5
- declare type UpdateFn<T> = (oldValue: T | void) => T;
5
+ type UpdateFn<T> = (oldValue: T | void) => T;
6
6
  export declare class PrefixTree<T> {
7
7
  index: IndexObject<T>;
8
8
  delimiter: string;
@@ -5,11 +5,11 @@ import type httpType from 'http';
5
5
  import type httpsType from 'https';
6
6
  import type { Counter, Histogram } from 'prom-client';
7
7
  import type { METRICS_MODULE_TOKEN, METRICS_SERVICES_REGISTRY_TOKEN, ModuleConfig } from '@tramvai/tokens-metrics';
8
- export declare type MetricsModule = typeof METRICS_MODULE_TOKEN;
9
- export declare type HttpModule = typeof httpType;
10
- export declare type HttpsModule = typeof httpsType;
11
- export declare type OriginalRequest = HttpModule['request'];
12
- export declare type MetricsInstances = {
8
+ export type MetricsModule = typeof METRICS_MODULE_TOKEN;
9
+ export type HttpModule = typeof httpType;
10
+ export type HttpsModule = typeof httpsType;
11
+ export type OriginalRequest = HttpModule['request'];
12
+ export type MetricsInstances = {
13
13
  requestsTotal: Counter<'status' | 'method' | 'service'>;
14
14
  requestsErrors: Counter<'status' | 'method' | 'service'>;
15
15
  requestsDuration: Histogram<'status' | 'method' | 'service'>;
@@ -17,9 +17,9 @@ export declare type MetricsInstances = {
17
17
  tcpConnectDuration: Histogram<'service'>;
18
18
  tlsHandshakeDuration: Histogram<'service'>;
19
19
  };
20
- export declare type GetServiceName = typeof METRICS_SERVICES_REGISTRY_TOKEN['getServiceName'];
21
- export declare type Args = [RequestOptions | string | URL, (res: IncomingMessage) => void] | [string | URL, RequestOptions, (res: IncomingMessage) => void];
22
- export declare type CreateRequestWithMetrics = (args: {
20
+ export type GetServiceName = typeof METRICS_SERVICES_REGISTRY_TOKEN['getServiceName'];
21
+ export type Args = [RequestOptions | string | URL, (res: IncomingMessage) => void] | [string | URL, RequestOptions, (res: IncomingMessage) => void];
22
+ export type CreateRequestWithMetrics = (args: {
23
23
  metricsInstances: MetricsInstances;
24
24
  getServiceName: GetServiceName;
25
25
  config: ModuleConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-metrics",
3
- "version": "2.40.0",
3
+ "version": "2.45.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.40.0",
23
- "@tramvai/tokens-server": "2.40.0",
24
- "@tramvai/tokens-server-private": "2.40.0",
25
- "@tramvai/tokens-metrics": "2.40.0",
26
- "@tramvai/tokens-router": "2.40.0",
27
- "@tramvai/module-common": "2.40.0",
28
- "@tramvai/tokens-http-client": "2.40.0",
29
- "@tramvai/state": "2.40.0",
30
- "@tramvai/papi": "2.40.0",
22
+ "@tramvai/core": "2.45.0",
23
+ "@tramvai/tokens-server": "2.45.0",
24
+ "@tramvai/tokens-server-private": "2.45.0",
25
+ "@tramvai/tokens-metrics": "2.45.0",
26
+ "@tramvai/tokens-router": "2.45.0",
27
+ "@tramvai/module-common": "2.45.0",
28
+ "@tramvai/tokens-http-client": "2.45.0",
29
+ "@tramvai/state": "2.45.0",
30
+ "@tramvai/papi": "2.45.0",
31
31
  "@tinkoff/measure-fastify-requests": "0.1.6",
32
32
  "@tinkoff/monkeypatch": "2.0.3",
33
33
  "@tinkoff/url": "0.8.4",