Compare commits
No commits in common. "a14795f347cee8d35835f75cfdaf094a152dbea4" and "69a7016e97900e79caf80800f1ad5064def20b3b" have entirely different histories.
a14795f347
...
69a7016e97
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@navy.gif/wrappers",
|
"name": "@navy.gif/wrappers",
|
||||||
"version": "1.7.3",
|
"version": "1.7.2",
|
||||||
"description": "Various wrapper classes I use in my projects",
|
"description": "Various wrapper classes I use in my projects",
|
||||||
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
|
"repository": "https://git.corgi.wtf/Navy.gif/wrappers.git",
|
||||||
"author": "Navy.gif",
|
"author": "Navy.gif",
|
||||||
|
@ -26,8 +26,7 @@ export type MariaOptions = {
|
|||||||
credentials: Credentials,
|
credentials: Credentials,
|
||||||
loggerOptions?: LoggerClientOptions,
|
loggerOptions?: LoggerClientOptions,
|
||||||
donorQuery?: boolean,
|
donorQuery?: boolean,
|
||||||
recordMetrics?: boolean,
|
recordMetrics?: boolean
|
||||||
metricsBuckets?: number[],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type MariaError = {
|
type MariaError = {
|
||||||
@ -248,7 +247,7 @@ class MariaDB
|
|||||||
MariaDB.#queryHistogram = new Prometheus.Histogram({
|
MariaDB.#queryHistogram = new Prometheus.Histogram({
|
||||||
name: 'sql_queries',
|
name: 'sql_queries',
|
||||||
help: 'Tracks query duration in seconds and frequency',
|
help: 'Tracks query duration in seconds and frequency',
|
||||||
buckets: this.#config.metricsBuckets ?? Prometheus?.exponentialBuckets(0.005, 2, 10),
|
buckets: Prometheus?.exponentialBuckets(0.005, 2, 10),
|
||||||
labelNames: [ 'type' ] as const
|
labelNames: [ 'type' ] as const
|
||||||
});
|
});
|
||||||
this.#server.registerMetric(MariaDB.#queryHistogram!);
|
this.#server.registerMetric(MariaDB.#queryHistogram!);
|
||||||
|
@ -22,8 +22,7 @@ export type MongoOptions = {
|
|||||||
loggerOptions?: LoggerClientOptions,
|
loggerOptions?: LoggerClientOptions,
|
||||||
client?: MongoClientOptions,
|
client?: MongoClientOptions,
|
||||||
load?: boolean,
|
load?: boolean,
|
||||||
recordMetrics?: boolean,
|
recordMetrics?: boolean
|
||||||
metricsBuckets?: number[],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type StringIndexable = {[key: string]: boolean | string | number | Document | object}
|
type StringIndexable = {[key: string]: boolean | string | number | Document | object}
|
||||||
@ -152,7 +151,7 @@ class MongoDB
|
|||||||
MongoDB.#queryHistogram = new Prometheus.Histogram({
|
MongoDB.#queryHistogram = new Prometheus.Histogram({
|
||||||
name: 'mongo_queries',
|
name: 'mongo_queries',
|
||||||
help: 'Tracks query duration in seconds and frequency',
|
help: 'Tracks query duration in seconds and frequency',
|
||||||
buckets: this.#config.metricsBuckets ?? Prometheus?.exponentialBuckets(0.005, 2, 10),
|
buckets: Prometheus?.exponentialBuckets(0.005, 2, 10),
|
||||||
labelNames: [ 'type' ] as const
|
labelNames: [ 'type' ] as const
|
||||||
});
|
});
|
||||||
this.#server.registerMetric(MongoDB.#queryHistogram!);
|
this.#server.registerMetric(MongoDB.#queryHistogram!);
|
||||||
|
Loading…
Reference in New Issue
Block a user