@graphql-yoga/plugin-prometheus 4.1.0-rc-20240313133241-a4a11b94 → 4.1.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.
- package/cjs/index.js +1 -1
- package/esm/index.js +1 -1
- package/package.json +3 -3
- package/typings/index.d.cts +1 -1
- package/typings/index.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -30,7 +30,7 @@ function usePrometheus(options) {
|
|
|
30
30
|
? options.http
|
|
31
31
|
: (0, prometheus_1.createHistogram)({
|
|
32
32
|
histogram: new prom_client_1.Histogram({
|
|
33
|
-
name: 'graphql_yoga_http_duration',
|
|
33
|
+
name: typeof options.http === 'string' ? options.http : 'graphql_yoga_http_duration',
|
|
34
34
|
help: 'Time spent on HTTP connection',
|
|
35
35
|
labelNames,
|
|
36
36
|
registers: [registry],
|
package/esm/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export function usePrometheus(options) {
|
|
|
25
25
|
? options.http
|
|
26
26
|
: createHistogram({
|
|
27
27
|
histogram: new Histogram({
|
|
28
|
-
name: 'graphql_yoga_http_duration',
|
|
28
|
+
name: typeof options.http === 'string' ? options.http : 'graphql_yoga_http_duration',
|
|
29
29
|
help: 'Time spent on HTTP connection',
|
|
30
30
|
labelNames,
|
|
31
31
|
registers: [registry],
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-yoga/plugin-prometheus",
|
|
3
|
-
"version": "4.1.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Prometheus plugin for GraphQL Yoga.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "^15.2.0 || ^16.0.0",
|
|
7
|
-
"graphql-yoga": "5.2.0
|
|
7
|
+
"graphql-yoga": "^5.2.0",
|
|
8
8
|
"prom-client": "^15.0.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@envelop/prometheus": "^9.
|
|
11
|
+
"@envelop/prometheus": "^9.4.0"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
package/typings/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { Plugin } from 'graphql-yoga';
|
|
|
2
2
|
import { createCounter, createHistogram, createSummary, PrometheusTracingPluginConfig as EnvelopPrometheusTracingPluginConfig, FillLabelsFnParams } from '@envelop/prometheus';
|
|
3
3
|
export { createCounter, createHistogram, createSummary, FillLabelsFnParams };
|
|
4
4
|
export interface PrometheusTracingPluginConfig extends EnvelopPrometheusTracingPluginConfig {
|
|
5
|
-
http?: boolean | ReturnType<typeof createHistogram>;
|
|
5
|
+
http?: boolean | string | ReturnType<typeof createHistogram>;
|
|
6
6
|
/**
|
|
7
7
|
* The endpoint to serve metrics exposed by this plugin.
|
|
8
8
|
* Defaults to "/metrics".
|
package/typings/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Plugin } from 'graphql-yoga';
|
|
|
2
2
|
import { createCounter, createHistogram, createSummary, PrometheusTracingPluginConfig as EnvelopPrometheusTracingPluginConfig, FillLabelsFnParams } from '@envelop/prometheus';
|
|
3
3
|
export { createCounter, createHistogram, createSummary, FillLabelsFnParams };
|
|
4
4
|
export interface PrometheusTracingPluginConfig extends EnvelopPrometheusTracingPluginConfig {
|
|
5
|
-
http?: boolean | ReturnType<typeof createHistogram>;
|
|
5
|
+
http?: boolean | string | ReturnType<typeof createHistogram>;
|
|
6
6
|
/**
|
|
7
7
|
* The endpoint to serve metrics exposed by this plugin.
|
|
8
8
|
* Defaults to "/metrics".
|