@xyo-network/prometheus-node-plugin 3.3.0 → 3.4.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/dist/node/index.d.ts +89 -5
- package/package.json +10 -10
- package/dist/node/Payload.d.ts +0 -10
- package/dist/node/Payload.d.ts.map +0 -1
- package/dist/node/Plugin.d.ts +0 -47
- package/dist/node/Plugin.d.ts.map +0 -1
- package/dist/node/Schema.d.ts +0 -3
- package/dist/node/Schema.d.ts.map +0 -1
- package/dist/node/Witness.d.ts +0 -25
- package/dist/node/Witness.d.ts.map +0 -1
- package/dist/node/index.d.ts.map +0 -1
package/dist/node/index.d.ts
CHANGED
|
@@ -1,5 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as _xyo_network_payload_model from '@xyo-network/payload-model';
|
|
2
|
+
import { Payload, Schema } from '@xyo-network/payload-model';
|
|
3
|
+
import { Aggregator, MetricType, Registry } from 'prom-client';
|
|
4
|
+
import * as _xyo_network_payloadset_plugin from '@xyo-network/payloadset-plugin';
|
|
5
|
+
import * as _store__xylabs_logger_npm_4_5_1_a411051254_package from '.store/@xylabs-logger-npm-4.5.1-a411051254/package';
|
|
6
|
+
import * as _xyo_network_module_model from '@xyo-network/module-model';
|
|
7
|
+
import { AnyConfigSchema } from '@xyo-network/module-model';
|
|
8
|
+
import * as _store__xyo_network_account_model_virtual_3a3814c98f_package from '.store/@xyo-network-account-model-virtual-3a3814c98f/package';
|
|
9
|
+
import * as _store__xylabs_object_npm_4_5_1_e31c389195_package from '.store/@xylabs-object-npm-4.5.1-e31c389195/package';
|
|
10
|
+
import { Server } from 'node:http';
|
|
11
|
+
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
12
|
+
import { WitnessParams, WitnessConfig } from '@xyo-network/witness-model';
|
|
13
|
+
|
|
14
|
+
type PrometheusMetricValueSchema = 'network.xyo.prometheus.metric.value';
|
|
15
|
+
declare const PrometheusMetricValueSchema: PrometheusMetricValueSchema;
|
|
16
|
+
|
|
17
|
+
type PrometheusMetricValuePayload = Payload<{
|
|
18
|
+
aggregator: Aggregator;
|
|
19
|
+
name: string;
|
|
20
|
+
type: MetricType;
|
|
21
|
+
values: (number | string | object)[];
|
|
22
|
+
}, PrometheusMetricValueSchema>;
|
|
23
|
+
|
|
24
|
+
type PrometheusNodeWitnessConfigSchema = 'network.xyo.prometheus.node.witness.config';
|
|
25
|
+
declare const PrometheusNodeWitnessConfigSchema: PrometheusNodeWitnessConfigSchema;
|
|
26
|
+
type PrometheusNodeWitnessConfig = WitnessConfig<{
|
|
27
|
+
port?: number;
|
|
28
|
+
schema: PrometheusNodeWitnessConfigSchema;
|
|
29
|
+
}>;
|
|
30
|
+
type PrometheusNodeWitnessParams = WitnessParams<AnyConfigSchema<PrometheusNodeWitnessConfig>>;
|
|
31
|
+
declare class PrometheusNodeWitness<TParams extends PrometheusNodeWitnessParams = PrometheusNodeWitnessParams> extends AbstractWitness<TParams> {
|
|
32
|
+
static readonly configSchemas: Schema[];
|
|
33
|
+
static readonly defaultConfigSchema: Schema;
|
|
34
|
+
protected _registry: Registry<"text/plain; version=0.0.4; charset=utf-8">;
|
|
35
|
+
protected server?: Server;
|
|
36
|
+
get registry(): Registry;
|
|
37
|
+
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
38
|
+
protected startHandler(): Promise<boolean>;
|
|
39
|
+
protected stopHandler(): Promise<boolean>;
|
|
40
|
+
private generateMetricValues;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare const PrometheusNodePlugin: () => _xyo_network_payloadset_plugin.PayloadSetWitnessPlugin<PrometheusNodeWitness<_store__xylabs_object_npm_4_5_1_e31c389195_package.BaseParamsFields & {
|
|
44
|
+
account?: _store__xyo_network_account_model_virtual_3a3814c98f_package.AccountInstance | "random";
|
|
45
|
+
addToResolvers?: boolean;
|
|
46
|
+
additionalSigners?: _store__xyo_network_account_model_virtual_3a3814c98f_package.AccountInstance[];
|
|
47
|
+
allowNameResolution?: boolean;
|
|
48
|
+
config: _store__xylabs_object_npm_4_5_1_e31c389195_package.DeepRestrictToStringKeys<{
|
|
49
|
+
schema: _xyo_network_payload_model.Schema;
|
|
50
|
+
readonly name?: _xyo_network_module_model.ModuleName | undefined;
|
|
51
|
+
readonly archiving?: {
|
|
52
|
+
readonly archivists?: string[] | undefined;
|
|
53
|
+
readonly queries?: string[] | undefined;
|
|
54
|
+
} | undefined;
|
|
55
|
+
readonly allowedQueries?: string[] | undefined;
|
|
56
|
+
readonly archivist?: _xyo_network_module_model.ModuleIdentifier | undefined;
|
|
57
|
+
readonly consoleLogger?: _store__xylabs_logger_npm_4_5_1_a411051254_package.LogLevel | undefined;
|
|
58
|
+
readonly labels?: {
|
|
59
|
+
[x: string]: string | undefined;
|
|
60
|
+
} | undefined;
|
|
61
|
+
readonly paging?: {
|
|
62
|
+
[x: string]: {
|
|
63
|
+
size?: number | undefined;
|
|
64
|
+
};
|
|
65
|
+
} | undefined;
|
|
66
|
+
readonly retry?: {
|
|
67
|
+
backoff?: number | undefined;
|
|
68
|
+
interval?: number | undefined;
|
|
69
|
+
retries?: number | undefined;
|
|
70
|
+
} | undefined;
|
|
71
|
+
readonly security?: {
|
|
72
|
+
readonly allowAnonymous?: boolean | undefined;
|
|
73
|
+
readonly allowed?: {
|
|
74
|
+
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
75
|
+
} | undefined;
|
|
76
|
+
readonly disallowed?: {
|
|
77
|
+
[x: string]: Lowercase<string>[];
|
|
78
|
+
} | undefined;
|
|
79
|
+
} | undefined;
|
|
80
|
+
readonly sign?: boolean | undefined;
|
|
81
|
+
readonly storeQueries?: boolean | undefined;
|
|
82
|
+
readonly timestamp?: boolean | undefined;
|
|
83
|
+
port?: number | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
ephemeralQueryAccountEnabled?: boolean;
|
|
86
|
+
moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
|
|
87
|
+
}>>;
|
|
88
|
+
|
|
89
|
+
export { type PrometheusMetricValuePayload, PrometheusMetricValueSchema, PrometheusNodePlugin, PrometheusNodeWitness, type PrometheusNodeWitnessConfig, PrometheusNodeWitnessConfigSchema, type PrometheusNodeWitnessParams, PrometheusNodePlugin as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/prometheus-node-plugin",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Typescript/Javascript Plugins for XYO Platform",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"types": "dist/node/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@xylabs/exists": "^4.5.1",
|
|
33
|
-
"@xyo-network/abstract-witness": "^3.
|
|
34
|
-
"@xyo-network/module-model": "^3.
|
|
35
|
-
"@xyo-network/payload-model": "^3.
|
|
36
|
-
"@xyo-network/payloadset-plugin": "^3.
|
|
37
|
-
"@xyo-network/witness-model": "^3.
|
|
33
|
+
"@xyo-network/abstract-witness": "^3.8.5",
|
|
34
|
+
"@xyo-network/module-model": "^3.8.5",
|
|
35
|
+
"@xyo-network/payload-model": "^3.8.5",
|
|
36
|
+
"@xyo-network/payloadset-plugin": "^3.8.5",
|
|
37
|
+
"@xyo-network/witness-model": "^3.8.5",
|
|
38
38
|
"prom-client": "^15.1.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
42
|
-
"@xylabs/tsconfig": "^
|
|
41
|
+
"@xylabs/ts-scripts-yarn3": "^5.0.22",
|
|
42
|
+
"@xylabs/tsconfig": "^5.0.22",
|
|
43
43
|
"@xylabs/vitest-extended": "^4.5.1",
|
|
44
|
-
"@xyo-network/payload-wrapper": "^3.
|
|
44
|
+
"@xyo-network/payload-wrapper": "^3.8.5",
|
|
45
45
|
"typescript": "^5.7.3",
|
|
46
|
-
"vitest": "^3.0.
|
|
46
|
+
"vitest": "^3.0.5"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
package/dist/node/Payload.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
2
|
-
import type { Aggregator, MetricType } from 'prom-client';
|
|
3
|
-
import type { PrometheusMetricValueSchema } from './Schema.ts';
|
|
4
|
-
export type PrometheusMetricValuePayload = Payload<{
|
|
5
|
-
aggregator: Aggregator;
|
|
6
|
-
name: string;
|
|
7
|
-
type: MetricType;
|
|
8
|
-
values: (number | string | object)[];
|
|
9
|
-
}, PrometheusMetricValueSchema>;
|
|
10
|
-
//# sourceMappingURL=Payload.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../src/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEzD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAA;AAE9D,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAChD;IACE,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,UAAU,CAAA;IAChB,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;CACrC,EACD,2BAA2B,CAC5B,CAAA"}
|
package/dist/node/Plugin.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { PrometheusNodeWitness } from './Witness.ts';
|
|
2
|
-
export declare const PrometheusNodePlugin: () => import("@xyo-network/payloadset-plugin").PayloadSetWitnessPlugin<PrometheusNodeWitness<import(".store/@xylabs-object-npm-4.5.1-e31c389195/package").BaseParamsFields & {
|
|
3
|
-
account?: import(".store/@xyo-network-account-model-virtual-281bb6acc0/package").AccountInstance | "random";
|
|
4
|
-
addToResolvers?: boolean;
|
|
5
|
-
additionalSigners?: import(".store/@xyo-network-account-model-virtual-281bb6acc0/package").AccountInstance[];
|
|
6
|
-
allowNameResolution?: boolean;
|
|
7
|
-
config: import(".store/@xylabs-object-npm-4.5.1-e31c389195/package").DeepRestrictToStringKeys<{
|
|
8
|
-
schema: import("@xyo-network/payload-model").Schema;
|
|
9
|
-
readonly name?: import("@xyo-network/module-model").ModuleName | undefined;
|
|
10
|
-
readonly archiving?: {
|
|
11
|
-
readonly archivists?: string[] | undefined;
|
|
12
|
-
readonly queries?: string[] | undefined;
|
|
13
|
-
} | undefined;
|
|
14
|
-
readonly allowedQueries?: string[] | undefined;
|
|
15
|
-
readonly archivist?: import("@xyo-network/module-model").ModuleIdentifier | undefined;
|
|
16
|
-
readonly consoleLogger?: import(".store/@xylabs-logger-npm-4.5.1-a411051254/package").LogLevel | undefined;
|
|
17
|
-
readonly labels?: {
|
|
18
|
-
[x: string]: string | undefined;
|
|
19
|
-
} | undefined;
|
|
20
|
-
readonly paging?: {
|
|
21
|
-
[x: string]: {
|
|
22
|
-
size?: number | undefined;
|
|
23
|
-
};
|
|
24
|
-
} | undefined;
|
|
25
|
-
readonly retry?: {
|
|
26
|
-
backoff?: number | undefined;
|
|
27
|
-
interval?: number | undefined;
|
|
28
|
-
retries?: number | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
readonly security?: {
|
|
31
|
-
readonly allowAnonymous?: boolean | undefined;
|
|
32
|
-
readonly allowed?: {
|
|
33
|
-
[x: string]: (Lowercase<string> | Lowercase<string>[])[];
|
|
34
|
-
} | undefined;
|
|
35
|
-
readonly disallowed?: {
|
|
36
|
-
[x: string]: Lowercase<string>[];
|
|
37
|
-
} | undefined;
|
|
38
|
-
} | undefined;
|
|
39
|
-
readonly sign?: boolean | undefined;
|
|
40
|
-
readonly storeQueries?: boolean | undefined;
|
|
41
|
-
readonly timestamp?: boolean | undefined;
|
|
42
|
-
port?: number | undefined;
|
|
43
|
-
}>;
|
|
44
|
-
ephemeralQueryAccountEnabled?: boolean;
|
|
45
|
-
moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
|
|
46
|
-
}>>;
|
|
47
|
-
//# sourceMappingURL=Plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Plugin.d.ts","sourceRoot":"","sources":["../../src/Plugin.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAS9B,CAAA"}
|
package/dist/node/Schema.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../src/Schema.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,GAAG,qCAAqC,CAAA;AAC/E,eAAO,MAAM,2BAA2B,EAAE,2BAAmE,CAAA"}
|
package/dist/node/Witness.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Server } from 'node:http';
|
|
2
|
-
import { AbstractWitness } from '@xyo-network/abstract-witness';
|
|
3
|
-
import type { AnyConfigSchema } from '@xyo-network/module-model';
|
|
4
|
-
import type { Payload, Schema } from '@xyo-network/payload-model';
|
|
5
|
-
import type { WitnessConfig, WitnessParams } from '@xyo-network/witness-model';
|
|
6
|
-
import { Registry } from 'prom-client';
|
|
7
|
-
export type PrometheusNodeWitnessConfigSchema = 'network.xyo.prometheus.node.witness.config';
|
|
8
|
-
export declare const PrometheusNodeWitnessConfigSchema: PrometheusNodeWitnessConfigSchema;
|
|
9
|
-
export type PrometheusNodeWitnessConfig = WitnessConfig<{
|
|
10
|
-
port?: number;
|
|
11
|
-
schema: PrometheusNodeWitnessConfigSchema;
|
|
12
|
-
}>;
|
|
13
|
-
export type PrometheusNodeWitnessParams = WitnessParams<AnyConfigSchema<PrometheusNodeWitnessConfig>>;
|
|
14
|
-
export declare class PrometheusNodeWitness<TParams extends PrometheusNodeWitnessParams = PrometheusNodeWitnessParams> extends AbstractWitness<TParams> {
|
|
15
|
-
static readonly configSchemas: Schema[];
|
|
16
|
-
static readonly defaultConfigSchema: Schema;
|
|
17
|
-
protected _registry: Registry<"text/plain; version=0.0.4; charset=utf-8">;
|
|
18
|
-
protected server?: Server;
|
|
19
|
-
get registry(): Registry;
|
|
20
|
-
protected observeHandler(_payloads?: Partial<Payload>[]): Promise<Payload[]>;
|
|
21
|
-
protected startHandler(): Promise<boolean>;
|
|
22
|
-
protected stopHandler(): Promise<boolean>;
|
|
23
|
-
private generateMetricValues;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=Witness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Witness.d.ts","sourceRoot":"","sources":["../../src/Witness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAIvC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC9E,OAAO,EAAyB,QAAQ,EAAE,MAAM,aAAa,CAAA;AAK7D,MAAM,MAAM,iCAAiC,GAAG,4CAA4C,CAAA;AAC5F,eAAO,MAAM,iCAAiC,EAAE,iCAAgF,CAAA;AAEhI,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC;IACtD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,iCAAiC,CAAA;CAC1C,CAAC,CAAA;AAEF,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC,eAAe,CAAC,2BAA2B,CAAC,CAAC,CAAA;AAGrG,qBAAa,qBAAqB,CAAC,OAAO,SAAS,2BAA2B,GAAG,2BAA2B,CAAE,SAAQ,eAAe,CAAC,OAAO,CAAC;IAC5I,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAA8D;IAC9G,gBAAyB,mBAAmB,EAAE,MAAM,CAAoC;IACxF,SAAS,CAAC,SAAS,uDAAiB;IACpC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IAEzB,IAAI,QAAQ,IAAI,QAAQ,CAEvB;cAEwB,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;cAIlE,YAAY;cAcZ,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;YAK1C,oBAAoB;CAUnC"}
|
package/dist/node/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,OAAO,EAAE,oBAAoB,IAAI,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AACnF,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|