@libp2p/prometheus-metrics 5.0.16 → 5.0.18
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/dist/src/counter-group.d.ts +1 -1
- package/dist/src/counter-group.js +1 -1
- package/dist/src/counter.d.ts +1 -1
- package/dist/src/counter.js +1 -1
- package/dist/src/histogram-group.d.ts +1 -1
- package/dist/src/histogram-group.js +1 -1
- package/dist/src/histogram.d.ts +1 -1
- package/dist/src/histogram.js +1 -1
- package/dist/src/index.js +8 -8
- package/dist/src/metric-group.d.ts +1 -1
- package/dist/src/metric-group.js +1 -1
- package/dist/src/metric.d.ts +1 -1
- package/dist/src/metric.js +1 -1
- package/dist/src/summary-group.d.ts +1 -1
- package/dist/src/summary-group.js +1 -1
- package/dist/src/summary.d.ts +1 -1
- package/dist/src/summary.js +1 -1
- package/package.json +6 -5
- package/src/counter-group.ts +2 -2
- package/src/counter.ts +2 -2
- package/src/histogram-group.ts +2 -2
- package/src/histogram.ts +2 -2
- package/src/index.ts +8 -8
- package/src/metric-group.ts +2 -2
- package/src/metric.ts +2 -2
- package/src/summary-group.ts +2 -2
- package/src/summary.ts +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts';
|
|
2
2
|
import type { CounterGroup } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusCounterGroup implements CounterGroup {
|
|
4
4
|
private readonly counter;
|
package/dist/src/counter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts';
|
|
2
2
|
import type { Counter } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusCounter implements Counter {
|
|
4
4
|
private readonly counter;
|
package/dist/src/counter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedHistogramOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedHistogramOptions } from './index.ts';
|
|
2
2
|
import type { HistogramGroup, StopTimer } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusHistogramGroup implements HistogramGroup {
|
|
4
4
|
private readonly histogram;
|
package/dist/src/histogram.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedHistogramOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedHistogramOptions } from './index.ts';
|
|
2
2
|
import type { StopTimer, Histogram } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusHistogram implements Histogram {
|
|
4
4
|
private readonly histogram;
|
package/dist/src/histogram.js
CHANGED
package/dist/src/index.js
CHANGED
|
@@ -69,14 +69,14 @@ import { statfs } from 'node:fs/promises';
|
|
|
69
69
|
import { totalmem } from 'node:os';
|
|
70
70
|
import { serviceCapabilities } from '@libp2p/interface';
|
|
71
71
|
import { collectDefaultMetrics, register } from 'prom-client';
|
|
72
|
-
import { PrometheusCounterGroup } from
|
|
73
|
-
import { PrometheusCounter } from
|
|
74
|
-
import { PrometheusHistogramGroup } from
|
|
75
|
-
import { PrometheusHistogram } from
|
|
76
|
-
import { PrometheusMetricGroup } from
|
|
77
|
-
import { PrometheusMetric } from
|
|
78
|
-
import { PrometheusSummaryGroup } from
|
|
79
|
-
import { PrometheusSummary } from
|
|
72
|
+
import { PrometheusCounterGroup } from "./counter-group.js";
|
|
73
|
+
import { PrometheusCounter } from "./counter.js";
|
|
74
|
+
import { PrometheusHistogramGroup } from "./histogram-group.js";
|
|
75
|
+
import { PrometheusHistogram } from "./histogram.js";
|
|
76
|
+
import { PrometheusMetricGroup } from "./metric-group.js";
|
|
77
|
+
import { PrometheusMetric } from "./metric.js";
|
|
78
|
+
import { PrometheusSummaryGroup } from "./summary-group.js";
|
|
79
|
+
import { PrometheusSummary } from "./summary.js";
|
|
80
80
|
// export helper functions for creating buckets
|
|
81
81
|
export { linearBuckets, exponentialBuckets } from 'prom-client';
|
|
82
82
|
// prom-client metrics are global
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts';
|
|
2
2
|
import type { MetricGroup, StopTimer } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusMetricGroup implements MetricGroup {
|
|
4
4
|
private readonly gauge;
|
package/dist/src/metric-group.js
CHANGED
package/dist/src/metric.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts';
|
|
2
2
|
import type { Metric, StopTimer } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusMetric implements Metric {
|
|
4
4
|
private readonly gauge;
|
package/dist/src/metric.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedSummaryOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedSummaryOptions } from './index.ts';
|
|
2
2
|
import type { SummaryGroup, StopTimer } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusSummaryGroup implements SummaryGroup {
|
|
4
4
|
private readonly summary;
|
package/dist/src/summary.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrometheusCalculatedSummaryOptions } from './index.
|
|
1
|
+
import type { PrometheusCalculatedSummaryOptions } from './index.ts';
|
|
2
2
|
import type { StopTimer, Summary } from '@libp2p/interface';
|
|
3
3
|
export declare class PrometheusSummary implements Summary {
|
|
4
4
|
private readonly summary;
|
package/dist/src/summary.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/prometheus-metrics",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.18",
|
|
4
4
|
"description": "Collect libp2p metrics for scraping by Prometheus or Graphana",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "Apache-2.0 OR MIT",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
29
|
"types": "./dist/src/index.d.ts",
|
|
30
|
-
"import": "./dist/src/index.js"
|
|
30
|
+
"import": "./dist/src/index.js",
|
|
31
|
+
"module-sync": "./dist/src/index.js"
|
|
31
32
|
}
|
|
32
33
|
},
|
|
33
34
|
"scripts": {
|
|
@@ -41,12 +42,12 @@
|
|
|
41
42
|
"test:electron-main": "aegir test -t electron-main --cov"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@libp2p/interface": "^3.2.
|
|
45
|
+
"@libp2p/interface": "^3.2.2",
|
|
45
46
|
"prom-client": "^15.1.3"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@libp2p/logger": "^6.2.
|
|
49
|
-
"@libp2p/utils": "^7.0.
|
|
49
|
+
"@libp2p/logger": "^6.2.6",
|
|
50
|
+
"@libp2p/utils": "^7.0.17",
|
|
50
51
|
"aegir": "^47.0.22",
|
|
51
52
|
"p-event": "^7.0.0"
|
|
52
53
|
},
|
package/src/counter-group.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Counter as PromCounter } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts'
|
|
4
4
|
import type { CounterGroup } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|
package/src/counter.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Counter as PromCounter } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts'
|
|
4
4
|
import type { Counter } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|
package/src/histogram-group.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Histogram as PromHistogram } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedHistogramOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedHistogramOptions } from './index.ts'
|
|
4
4
|
import type { HistogramGroup, StopTimer } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|
package/src/histogram.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Histogram as PromHistogram } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedHistogramOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedHistogramOptions } from './index.ts'
|
|
4
4
|
import type { StopTimer, Histogram } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|
package/src/index.ts
CHANGED
|
@@ -70,14 +70,14 @@ import { statfs } from 'node:fs/promises'
|
|
|
70
70
|
import { totalmem } from 'node:os'
|
|
71
71
|
import { serviceCapabilities } from '@libp2p/interface'
|
|
72
72
|
import { collectDefaultMetrics, register } from 'prom-client'
|
|
73
|
-
import { PrometheusCounterGroup } from './counter-group.
|
|
74
|
-
import { PrometheusCounter } from './counter.
|
|
75
|
-
import { PrometheusHistogramGroup } from './histogram-group.
|
|
76
|
-
import { PrometheusHistogram } from './histogram.
|
|
77
|
-
import { PrometheusMetricGroup } from './metric-group.
|
|
78
|
-
import { PrometheusMetric } from './metric.
|
|
79
|
-
import { PrometheusSummaryGroup } from './summary-group.
|
|
80
|
-
import { PrometheusSummary } from './summary.
|
|
73
|
+
import { PrometheusCounterGroup } from './counter-group.ts'
|
|
74
|
+
import { PrometheusCounter } from './counter.ts'
|
|
75
|
+
import { PrometheusHistogramGroup } from './histogram-group.ts'
|
|
76
|
+
import { PrometheusHistogram } from './histogram.ts'
|
|
77
|
+
import { PrometheusMetricGroup } from './metric-group.ts'
|
|
78
|
+
import { PrometheusMetric } from './metric.ts'
|
|
79
|
+
import { PrometheusSummaryGroup } from './summary-group.ts'
|
|
80
|
+
import { PrometheusSummary } from './summary.ts'
|
|
81
81
|
import type { ComponentLogger, Logger, MultiaddrConnection, Stream, CalculatedMetricOptions, Counter, CounterGroup, Metric, MetricGroup, MetricOptions, Metrics, CalculatedHistogramOptions, CalculatedSummaryOptions, HistogramOptions, Histogram, HistogramGroup, SummaryOptions, Summary, SummaryGroup, MessageStream } from '@libp2p/interface'
|
|
82
82
|
import type { DefaultMetricsCollectorConfiguration, Registry, RegistryContentType } from 'prom-client'
|
|
83
83
|
|
package/src/metric-group.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Gauge } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts'
|
|
4
4
|
import type { MetricGroup, StopTimer } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|
package/src/metric.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Gauge } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedMetricOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedMetricOptions } from './index.ts'
|
|
4
4
|
import type { Metric, StopTimer } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|
package/src/summary-group.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Summary as PromSummary } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedSummaryOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedSummaryOptions } from './index.ts'
|
|
4
4
|
import type { SummaryGroup, StopTimer } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|
package/src/summary.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Summary as PromSummary } from 'prom-client'
|
|
2
|
-
import { normalizeString } from './utils.
|
|
3
|
-
import type { PrometheusCalculatedSummaryOptions } from './index.
|
|
2
|
+
import { normalizeString } from './utils.ts'
|
|
3
|
+
import type { PrometheusCalculatedSummaryOptions } from './index.ts'
|
|
4
4
|
import type { StopTimer, Summary } from '@libp2p/interface'
|
|
5
5
|
import type { CollectFunction } from 'prom-client'
|
|
6
6
|
|