@tramvai/tokens-metrics 1.90.4 → 1.91.1

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/index.d.ts CHANGED
@@ -5,6 +5,10 @@ interface Metrics {
5
5
  histogram<T extends string = string>(opt: HistogramConfiguration<T>): Histogram<T>;
6
6
  summary<T extends string = string>(opt: SummaryConfiguration<T>): Summary<T>;
7
7
  }
8
+ export declare type ModuleConfig = {
9
+ enableConnectionResolveMetrics: boolean;
10
+ port?: number;
11
+ };
8
12
  export { Counter, Gauge, Histogram, Summary, Metrics };
9
13
  /**
10
14
  * @description
@@ -26,3 +30,8 @@ export declare const METRICS_SERVICES_REGISTRY_TOKEN: MetricsServicesRegistryInt
26
30
  * Token for registering counter metric which can be incremented with POST papi request
27
31
  */
28
32
  export declare const REGISTER_INSTANT_METRIC_TOKEN: [string, Counter<string>];
33
+ /**
34
+ * @description
35
+ * Configuration for the metrics
36
+ */
37
+ export declare const METRICS_MODULE_CONFIG_TOKEN: ModuleConfig;
package/lib/index.es.js CHANGED
@@ -15,5 +15,10 @@ const METRICS_SERVICES_REGISTRY_TOKEN = createToken('metricsServicesRegistry');
15
15
  * Token for registering counter metric which can be incremented with POST papi request
16
16
  */
17
17
  const REGISTER_INSTANT_METRIC_TOKEN = createToken('registerInstantMetric');
18
+ /**
19
+ * @description
20
+ * Configuration for the metrics
21
+ */
22
+ const METRICS_MODULE_CONFIG_TOKEN = createToken('metrics-module-config');
18
23
 
19
- export { METRICS_MODULE_TOKEN, METRICS_SERVICES_REGISTRY_TOKEN, REGISTER_INSTANT_METRIC_TOKEN };
24
+ export { METRICS_MODULE_CONFIG_TOKEN, METRICS_MODULE_TOKEN, METRICS_SERVICES_REGISTRY_TOKEN, REGISTER_INSTANT_METRIC_TOKEN };
package/lib/index.js CHANGED
@@ -19,7 +19,13 @@ const METRICS_SERVICES_REGISTRY_TOKEN = dippy.createToken('metricsServicesRegist
19
19
  * Token for registering counter metric which can be incremented with POST papi request
20
20
  */
21
21
  const REGISTER_INSTANT_METRIC_TOKEN = dippy.createToken('registerInstantMetric');
22
+ /**
23
+ * @description
24
+ * Configuration for the metrics
25
+ */
26
+ const METRICS_MODULE_CONFIG_TOKEN = dippy.createToken('metrics-module-config');
22
27
 
28
+ exports.METRICS_MODULE_CONFIG_TOKEN = METRICS_MODULE_CONFIG_TOKEN;
23
29
  exports.METRICS_MODULE_TOKEN = METRICS_MODULE_TOKEN;
24
30
  exports.METRICS_SERVICES_REGISTRY_TOKEN = METRICS_SERVICES_REGISTRY_TOKEN;
25
31
  exports.REGISTER_INSTANT_METRIC_TOKEN = REGISTER_INSTANT_METRIC_TOKEN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-metrics",
3
- "version": "1.90.4",
3
+ "version": "1.91.1",
4
4
  "description": "Tramvai tokens for @tramvai/module-metrics",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",