@envelop/prometheus 10.0.0 → 11.0.0-alpha-20240726191829-a22a25d0
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 +57 -40
- package/esm/index.js +57 -40
- package/package.json +1 -1
- package/typings/config.d.cts +13 -13
- package/typings/config.d.ts +13 -13
- package/cjs/metrics.js +0 -1
- package/esm/metrics.js +0 -1
- package/typings/metrics.d.cts +0 -0
- package/typings/metrics.d.ts +0 -0
package/cjs/index.js
CHANGED
|
@@ -15,21 +15,30 @@ exports.execStartTimeMap = new WeakMap();
|
|
|
15
15
|
const usePrometheus = (config = {}) => {
|
|
16
16
|
let typeInfo = null;
|
|
17
17
|
const registry = (0, utils_js_1.instrumentRegistry)(config.registry || prom_client_1.register);
|
|
18
|
-
const parseHistogram = (0, utils_js_1.getHistogramFromConfig)(config, '
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
const parseHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'graphql_envelop_phase_parse', typeof config.graphql_envelop_phase_parse === 'string'
|
|
19
|
+
? config.graphql_envelop_phase_parse
|
|
20
|
+
: 'graphql_envelop_phase_parse', 'Time spent on running GraphQL "parse" function');
|
|
21
|
+
const validateHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'graphql_envelop_phase_validate', typeof config.graphql_envelop_phase_validate === 'string'
|
|
22
|
+
? config.graphql_envelop_phase_validate
|
|
23
|
+
: 'graphql_envelop_phase_validate', 'Time spent on running GraphQL "validate" function');
|
|
24
|
+
const contextBuildingHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'graphql_envelop_phase_context', typeof config.graphql_envelop_phase_context === 'string'
|
|
25
|
+
? config.graphql_envelop_phase_context
|
|
22
26
|
: 'graphql_envelop_phase_context', 'Time spent on building the GraphQL context');
|
|
23
|
-
const executeHistogram = (0, utils_js_1.getHistogramFromConfig)(config, '
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
const executeHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'graphql_envelop_phase_execute', typeof config.graphql_envelop_phase_execute === 'string'
|
|
28
|
+
? config.graphql_envelop_phase_execute
|
|
29
|
+
: 'graphql_envelop_phase_execute', 'Time spent on running the GraphQL "execute" function');
|
|
30
|
+
const subscribeHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'graphql_envelop_phase_subscribe', typeof config.graphql_envelop_phase_subscribe === 'string'
|
|
31
|
+
? config.graphql_envelop_phase_subscribe
|
|
32
|
+
: 'graphql_envelop_phase_subscribe', 'Time spent on running the GraphQL "subscribe" function');
|
|
33
|
+
const resolversHistogram = typeof config.graphql_envelop_execute_resolver === 'object'
|
|
34
|
+
? config.graphql_envelop_execute_resolver
|
|
35
|
+
: config.graphql_envelop_execute_resolver === true ||
|
|
36
|
+
typeof config.graphql_envelop_execute_resolver === 'string'
|
|
28
37
|
? (0, utils_js_1.createHistogram)({
|
|
29
38
|
registry,
|
|
30
39
|
histogram: {
|
|
31
|
-
name: typeof config.
|
|
32
|
-
? config.
|
|
40
|
+
name: typeof config.graphql_envelop_execute_resolver === 'string'
|
|
41
|
+
? config.graphql_envelop_execute_resolver
|
|
33
42
|
: 'graphql_envelop_execute_resolver',
|
|
34
43
|
help: 'Time spent on running the GraphQL resolvers',
|
|
35
44
|
labelNames: [
|
|
@@ -49,14 +58,15 @@ const usePrometheus = (config = {}) => {
|
|
|
49
58
|
}),
|
|
50
59
|
})
|
|
51
60
|
: undefined;
|
|
52
|
-
const requestTotalHistogram = typeof config.
|
|
53
|
-
? config.
|
|
54
|
-
: config.
|
|
61
|
+
const requestTotalHistogram = typeof config.graphql_envelop_request_duration === 'object'
|
|
62
|
+
? config.graphql_envelop_request_duration
|
|
63
|
+
: config.graphql_envelop_request_duration === true ||
|
|
64
|
+
typeof config.graphql_envelop_request_duration === 'string'
|
|
55
65
|
? (0, utils_js_1.createHistogram)({
|
|
56
66
|
registry,
|
|
57
67
|
histogram: {
|
|
58
|
-
name: typeof config.
|
|
59
|
-
? config.
|
|
68
|
+
name: typeof config.graphql_envelop_request_duration === 'string'
|
|
69
|
+
? config.graphql_envelop_request_duration
|
|
60
70
|
: 'graphql_envelop_request_duration',
|
|
61
71
|
help: 'Time spent on running the GraphQL operation from parse to execute',
|
|
62
72
|
labelNames: ['operationType', 'operationName'].filter(label => (0, utils_js_1.labelExists)(config, label)),
|
|
@@ -67,14 +77,15 @@ const usePrometheus = (config = {}) => {
|
|
|
67
77
|
}),
|
|
68
78
|
})
|
|
69
79
|
: undefined;
|
|
70
|
-
const requestSummary = typeof config.
|
|
71
|
-
? config.
|
|
72
|
-
: config.
|
|
80
|
+
const requestSummary = typeof config.graphql_envelop_request_time_summary === 'object'
|
|
81
|
+
? config.graphql_envelop_request_time_summary
|
|
82
|
+
: config.graphql_envelop_request_time_summary === true ||
|
|
83
|
+
typeof config.graphql_envelop_request_time_summary === 'string'
|
|
73
84
|
? (0, utils_js_1.createSummary)({
|
|
74
85
|
registry,
|
|
75
86
|
summary: {
|
|
76
|
-
name: typeof config.
|
|
77
|
-
? config.
|
|
87
|
+
name: typeof config.graphql_envelop_request_time_summary === 'string'
|
|
88
|
+
? config.graphql_envelop_request_time_summary
|
|
78
89
|
: 'graphql_envelop_request_time_summary',
|
|
79
90
|
help: 'Summary to measure the time to complete GraphQL operations',
|
|
80
91
|
labelNames: ['operationType', 'operationName'].filter(label => (0, utils_js_1.labelExists)(config, label)),
|
|
@@ -85,13 +96,16 @@ const usePrometheus = (config = {}) => {
|
|
|
85
96
|
}),
|
|
86
97
|
})
|
|
87
98
|
: undefined;
|
|
88
|
-
const errorsCounter = typeof config.
|
|
89
|
-
? config.
|
|
90
|
-
: config.
|
|
99
|
+
const errorsCounter = typeof config.graphql_envelop_error_result === 'object'
|
|
100
|
+
? config.graphql_envelop_error_result
|
|
101
|
+
: config.graphql_envelop_error_result === true ||
|
|
102
|
+
typeof config.graphql_envelop_error_result === 'string'
|
|
91
103
|
? (0, utils_js_1.createCounter)({
|
|
92
104
|
registry,
|
|
93
105
|
counter: {
|
|
94
|
-
name: typeof config.
|
|
106
|
+
name: typeof config.graphql_envelop_error_result === 'string'
|
|
107
|
+
? config.graphql_envelop_error_result
|
|
108
|
+
: 'graphql_envelop_error_result',
|
|
95
109
|
help: 'Counts the amount of errors reported from all phases',
|
|
96
110
|
labelNames: ['operationType', 'operationName', 'path', 'phase'].filter(label => (0, utils_js_1.labelExists)(config, label)),
|
|
97
111
|
},
|
|
@@ -103,14 +117,15 @@ const usePrometheus = (config = {}) => {
|
|
|
103
117
|
}),
|
|
104
118
|
})
|
|
105
119
|
: undefined;
|
|
106
|
-
const reqCounter = typeof config.
|
|
107
|
-
? config.
|
|
108
|
-
: config.
|
|
120
|
+
const reqCounter = typeof config.graphql_envelop_request === 'object'
|
|
121
|
+
? config.graphql_envelop_request
|
|
122
|
+
: config.graphql_envelop_request === true ||
|
|
123
|
+
typeof config.graphql_envelop_request === 'string'
|
|
109
124
|
? (0, utils_js_1.createCounter)({
|
|
110
125
|
registry,
|
|
111
126
|
counter: {
|
|
112
|
-
name: typeof config.
|
|
113
|
-
? config.
|
|
127
|
+
name: typeof config.graphql_envelop_request === 'string'
|
|
128
|
+
? config.graphql_envelop_request
|
|
114
129
|
: 'graphql_envelop_request',
|
|
115
130
|
help: 'Counts the amount of GraphQL requests executed through Envelop',
|
|
116
131
|
labelNames: ['operationType', 'operationName'].filter(label => (0, utils_js_1.labelExists)(config, label)),
|
|
@@ -121,14 +136,15 @@ const usePrometheus = (config = {}) => {
|
|
|
121
136
|
}),
|
|
122
137
|
})
|
|
123
138
|
: undefined;
|
|
124
|
-
const deprecationCounter = typeof config.
|
|
125
|
-
? config.
|
|
126
|
-
: config.
|
|
139
|
+
const deprecationCounter = typeof config.graphql_envelop_deprecated_field === 'object'
|
|
140
|
+
? config.graphql_envelop_deprecated_field
|
|
141
|
+
: config.graphql_envelop_deprecated_field === true ||
|
|
142
|
+
typeof config.graphql_envelop_deprecated_field === 'string'
|
|
127
143
|
? (0, utils_js_1.createCounter)({
|
|
128
144
|
registry,
|
|
129
145
|
counter: {
|
|
130
|
-
name: typeof config.
|
|
131
|
-
? config.
|
|
146
|
+
name: typeof config.graphql_envelop_deprecated_field === 'string'
|
|
147
|
+
? config.graphql_envelop_deprecated_field
|
|
132
148
|
: 'graphql_envelop_deprecated_field',
|
|
133
149
|
help: 'Counts the amount of deprecated fields used in selection sets',
|
|
134
150
|
labelNames: ['operationType', 'operationName', 'fieldName', 'typeName'].filter(label => (0, utils_js_1.labelExists)(config, label)),
|
|
@@ -141,14 +157,15 @@ const usePrometheus = (config = {}) => {
|
|
|
141
157
|
}),
|
|
142
158
|
})
|
|
143
159
|
: undefined;
|
|
144
|
-
const schemaChangeCounter = typeof config.
|
|
145
|
-
? config.
|
|
146
|
-
: config.
|
|
160
|
+
const schemaChangeCounter = typeof config.graphql_envelop_schema_change === 'object'
|
|
161
|
+
? config.graphql_envelop_schema_change
|
|
162
|
+
: config.graphql_envelop_schema_change === true ||
|
|
163
|
+
typeof config.graphql_envelop_schema_change === 'string'
|
|
147
164
|
? (0, utils_js_1.createCounter)({
|
|
148
165
|
registry,
|
|
149
166
|
counter: {
|
|
150
|
-
name: typeof config.
|
|
151
|
-
? config.
|
|
167
|
+
name: typeof config.graphql_envelop_schema_change === 'string'
|
|
168
|
+
? config.graphql_envelop_schema_change
|
|
152
169
|
: 'graphql_envelop_schema_change',
|
|
153
170
|
help: 'Counts the amount of schema changes',
|
|
154
171
|
},
|
package/esm/index.js
CHANGED
|
@@ -10,21 +10,30 @@ export const execStartTimeMap = new WeakMap();
|
|
|
10
10
|
export const usePrometheus = (config = {}) => {
|
|
11
11
|
let typeInfo = null;
|
|
12
12
|
const registry = instrumentRegistry(config.registry || defaultRegistry);
|
|
13
|
-
const parseHistogram = getHistogramFromConfig(config, '
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const parseHistogram = getHistogramFromConfig(config, 'graphql_envelop_phase_parse', typeof config.graphql_envelop_phase_parse === 'string'
|
|
14
|
+
? config.graphql_envelop_phase_parse
|
|
15
|
+
: 'graphql_envelop_phase_parse', 'Time spent on running GraphQL "parse" function');
|
|
16
|
+
const validateHistogram = getHistogramFromConfig(config, 'graphql_envelop_phase_validate', typeof config.graphql_envelop_phase_validate === 'string'
|
|
17
|
+
? config.graphql_envelop_phase_validate
|
|
18
|
+
: 'graphql_envelop_phase_validate', 'Time spent on running GraphQL "validate" function');
|
|
19
|
+
const contextBuildingHistogram = getHistogramFromConfig(config, 'graphql_envelop_phase_context', typeof config.graphql_envelop_phase_context === 'string'
|
|
20
|
+
? config.graphql_envelop_phase_context
|
|
17
21
|
: 'graphql_envelop_phase_context', 'Time spent on building the GraphQL context');
|
|
18
|
-
const executeHistogram = getHistogramFromConfig(config, '
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
const executeHistogram = getHistogramFromConfig(config, 'graphql_envelop_phase_execute', typeof config.graphql_envelop_phase_execute === 'string'
|
|
23
|
+
? config.graphql_envelop_phase_execute
|
|
24
|
+
: 'graphql_envelop_phase_execute', 'Time spent on running the GraphQL "execute" function');
|
|
25
|
+
const subscribeHistogram = getHistogramFromConfig(config, 'graphql_envelop_phase_subscribe', typeof config.graphql_envelop_phase_subscribe === 'string'
|
|
26
|
+
? config.graphql_envelop_phase_subscribe
|
|
27
|
+
: 'graphql_envelop_phase_subscribe', 'Time spent on running the GraphQL "subscribe" function');
|
|
28
|
+
const resolversHistogram = typeof config.graphql_envelop_execute_resolver === 'object'
|
|
29
|
+
? config.graphql_envelop_execute_resolver
|
|
30
|
+
: config.graphql_envelop_execute_resolver === true ||
|
|
31
|
+
typeof config.graphql_envelop_execute_resolver === 'string'
|
|
23
32
|
? createHistogram({
|
|
24
33
|
registry,
|
|
25
34
|
histogram: {
|
|
26
|
-
name: typeof config.
|
|
27
|
-
? config.
|
|
35
|
+
name: typeof config.graphql_envelop_execute_resolver === 'string'
|
|
36
|
+
? config.graphql_envelop_execute_resolver
|
|
28
37
|
: 'graphql_envelop_execute_resolver',
|
|
29
38
|
help: 'Time spent on running the GraphQL resolvers',
|
|
30
39
|
labelNames: [
|
|
@@ -44,14 +53,15 @@ export const usePrometheus = (config = {}) => {
|
|
|
44
53
|
}),
|
|
45
54
|
})
|
|
46
55
|
: undefined;
|
|
47
|
-
const requestTotalHistogram = typeof config.
|
|
48
|
-
? config.
|
|
49
|
-
: config.
|
|
56
|
+
const requestTotalHistogram = typeof config.graphql_envelop_request_duration === 'object'
|
|
57
|
+
? config.graphql_envelop_request_duration
|
|
58
|
+
: config.graphql_envelop_request_duration === true ||
|
|
59
|
+
typeof config.graphql_envelop_request_duration === 'string'
|
|
50
60
|
? createHistogram({
|
|
51
61
|
registry,
|
|
52
62
|
histogram: {
|
|
53
|
-
name: typeof config.
|
|
54
|
-
? config.
|
|
63
|
+
name: typeof config.graphql_envelop_request_duration === 'string'
|
|
64
|
+
? config.graphql_envelop_request_duration
|
|
55
65
|
: 'graphql_envelop_request_duration',
|
|
56
66
|
help: 'Time spent on running the GraphQL operation from parse to execute',
|
|
57
67
|
labelNames: ['operationType', 'operationName'].filter(label => labelExists(config, label)),
|
|
@@ -62,14 +72,15 @@ export const usePrometheus = (config = {}) => {
|
|
|
62
72
|
}),
|
|
63
73
|
})
|
|
64
74
|
: undefined;
|
|
65
|
-
const requestSummary = typeof config.
|
|
66
|
-
? config.
|
|
67
|
-
: config.
|
|
75
|
+
const requestSummary = typeof config.graphql_envelop_request_time_summary === 'object'
|
|
76
|
+
? config.graphql_envelop_request_time_summary
|
|
77
|
+
: config.graphql_envelop_request_time_summary === true ||
|
|
78
|
+
typeof config.graphql_envelop_request_time_summary === 'string'
|
|
68
79
|
? createSummary({
|
|
69
80
|
registry,
|
|
70
81
|
summary: {
|
|
71
|
-
name: typeof config.
|
|
72
|
-
? config.
|
|
82
|
+
name: typeof config.graphql_envelop_request_time_summary === 'string'
|
|
83
|
+
? config.graphql_envelop_request_time_summary
|
|
73
84
|
: 'graphql_envelop_request_time_summary',
|
|
74
85
|
help: 'Summary to measure the time to complete GraphQL operations',
|
|
75
86
|
labelNames: ['operationType', 'operationName'].filter(label => labelExists(config, label)),
|
|
@@ -80,13 +91,16 @@ export const usePrometheus = (config = {}) => {
|
|
|
80
91
|
}),
|
|
81
92
|
})
|
|
82
93
|
: undefined;
|
|
83
|
-
const errorsCounter = typeof config.
|
|
84
|
-
? config.
|
|
85
|
-
: config.
|
|
94
|
+
const errorsCounter = typeof config.graphql_envelop_error_result === 'object'
|
|
95
|
+
? config.graphql_envelop_error_result
|
|
96
|
+
: config.graphql_envelop_error_result === true ||
|
|
97
|
+
typeof config.graphql_envelop_error_result === 'string'
|
|
86
98
|
? createCounter({
|
|
87
99
|
registry,
|
|
88
100
|
counter: {
|
|
89
|
-
name: typeof config.
|
|
101
|
+
name: typeof config.graphql_envelop_error_result === 'string'
|
|
102
|
+
? config.graphql_envelop_error_result
|
|
103
|
+
: 'graphql_envelop_error_result',
|
|
90
104
|
help: 'Counts the amount of errors reported from all phases',
|
|
91
105
|
labelNames: ['operationType', 'operationName', 'path', 'phase'].filter(label => labelExists(config, label)),
|
|
92
106
|
},
|
|
@@ -98,14 +112,15 @@ export const usePrometheus = (config = {}) => {
|
|
|
98
112
|
}),
|
|
99
113
|
})
|
|
100
114
|
: undefined;
|
|
101
|
-
const reqCounter = typeof config.
|
|
102
|
-
? config.
|
|
103
|
-
: config.
|
|
115
|
+
const reqCounter = typeof config.graphql_envelop_request === 'object'
|
|
116
|
+
? config.graphql_envelop_request
|
|
117
|
+
: config.graphql_envelop_request === true ||
|
|
118
|
+
typeof config.graphql_envelop_request === 'string'
|
|
104
119
|
? createCounter({
|
|
105
120
|
registry,
|
|
106
121
|
counter: {
|
|
107
|
-
name: typeof config.
|
|
108
|
-
? config.
|
|
122
|
+
name: typeof config.graphql_envelop_request === 'string'
|
|
123
|
+
? config.graphql_envelop_request
|
|
109
124
|
: 'graphql_envelop_request',
|
|
110
125
|
help: 'Counts the amount of GraphQL requests executed through Envelop',
|
|
111
126
|
labelNames: ['operationType', 'operationName'].filter(label => labelExists(config, label)),
|
|
@@ -116,14 +131,15 @@ export const usePrometheus = (config = {}) => {
|
|
|
116
131
|
}),
|
|
117
132
|
})
|
|
118
133
|
: undefined;
|
|
119
|
-
const deprecationCounter = typeof config.
|
|
120
|
-
? config.
|
|
121
|
-
: config.
|
|
134
|
+
const deprecationCounter = typeof config.graphql_envelop_deprecated_field === 'object'
|
|
135
|
+
? config.graphql_envelop_deprecated_field
|
|
136
|
+
: config.graphql_envelop_deprecated_field === true ||
|
|
137
|
+
typeof config.graphql_envelop_deprecated_field === 'string'
|
|
122
138
|
? createCounter({
|
|
123
139
|
registry,
|
|
124
140
|
counter: {
|
|
125
|
-
name: typeof config.
|
|
126
|
-
? config.
|
|
141
|
+
name: typeof config.graphql_envelop_deprecated_field === 'string'
|
|
142
|
+
? config.graphql_envelop_deprecated_field
|
|
127
143
|
: 'graphql_envelop_deprecated_field',
|
|
128
144
|
help: 'Counts the amount of deprecated fields used in selection sets',
|
|
129
145
|
labelNames: ['operationType', 'operationName', 'fieldName', 'typeName'].filter(label => labelExists(config, label)),
|
|
@@ -136,14 +152,15 @@ export const usePrometheus = (config = {}) => {
|
|
|
136
152
|
}),
|
|
137
153
|
})
|
|
138
154
|
: undefined;
|
|
139
|
-
const schemaChangeCounter = typeof config.
|
|
140
|
-
? config.
|
|
141
|
-
: config.
|
|
155
|
+
const schemaChangeCounter = typeof config.graphql_envelop_schema_change === 'object'
|
|
156
|
+
? config.graphql_envelop_schema_change
|
|
157
|
+
: config.graphql_envelop_schema_change === true ||
|
|
158
|
+
typeof config.graphql_envelop_schema_change === 'string'
|
|
142
159
|
? createCounter({
|
|
143
160
|
registry,
|
|
144
161
|
counter: {
|
|
145
|
-
name: typeof config.
|
|
146
|
-
? config.
|
|
162
|
+
name: typeof config.graphql_envelop_schema_change === 'string'
|
|
163
|
+
? config.graphql_envelop_schema_change
|
|
147
164
|
: 'graphql_envelop_schema_change',
|
|
148
165
|
help: 'Counts the amount of schema changes',
|
|
149
166
|
},
|
package/package.json
CHANGED
package/typings/config.d.cts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Registry } from 'prom-client';
|
|
2
2
|
import { createCounter, createHistogram, createSummary } from './utils.cjs';
|
|
3
3
|
export type PrometheusTracingPluginConfig = {
|
|
4
|
-
requestCount?: boolean | string | ReturnType<typeof createCounter>;
|
|
5
|
-
requestTotalDuration?: boolean | string | ReturnType<typeof createHistogram>;
|
|
6
|
-
requestSummary?: boolean | string | ReturnType<typeof createSummary>;
|
|
7
|
-
parse?: boolean | string | ReturnType<typeof createHistogram>;
|
|
8
|
-
validate?: boolean | string | ReturnType<typeof createHistogram>;
|
|
9
|
-
contextBuilding?: boolean | string | ReturnType<typeof createHistogram>;
|
|
10
|
-
execute?: boolean | string | ReturnType<typeof createHistogram>;
|
|
11
|
-
subscribe?: boolean | string | ReturnType<typeof createHistogram>;
|
|
12
|
-
errors?: boolean | string | ReturnType<typeof createCounter>;
|
|
13
|
-
resolvers?: boolean | string | ReturnType<typeof createHistogram>;
|
|
14
|
-
resolversWhitelist?: string[];
|
|
15
|
-
deprecatedFields?: boolean | string | ReturnType<typeof createCounter>;
|
|
16
4
|
registry?: Registry;
|
|
17
5
|
skipIntrospection?: boolean;
|
|
18
|
-
|
|
6
|
+
graphql_envelop_request?: boolean | string | ReturnType<typeof createCounter>;
|
|
7
|
+
graphql_envelop_request_duration?: boolean | string | ReturnType<typeof createHistogram>;
|
|
8
|
+
graphql_envelop_request_time_summary?: boolean | string | ReturnType<typeof createSummary>;
|
|
9
|
+
graphql_envelop_phase_parse?: boolean | string | ReturnType<typeof createHistogram>;
|
|
10
|
+
graphql_envelop_phase_validate?: boolean | string | ReturnType<typeof createHistogram>;
|
|
11
|
+
graphql_envelop_phase_context?: boolean | string | ReturnType<typeof createHistogram>;
|
|
12
|
+
graphql_envelop_phase_execute?: boolean | string | ReturnType<typeof createHistogram>;
|
|
13
|
+
graphql_envelop_phase_subscribe?: boolean | string | ReturnType<typeof createHistogram>;
|
|
14
|
+
graphql_envelop_error_result?: boolean | string | ReturnType<typeof createCounter>;
|
|
15
|
+
graphql_envelop_deprecated_field?: boolean | string | ReturnType<typeof createCounter>;
|
|
16
|
+
graphql_envelop_schema_change?: boolean | string | ReturnType<typeof createCounter>;
|
|
17
|
+
graphql_envelop_execute_resolver?: boolean | string | ReturnType<typeof createHistogram>;
|
|
18
|
+
resolversWhitelist?: string[];
|
|
19
19
|
labels?: {
|
|
20
20
|
operationName?: boolean;
|
|
21
21
|
operationType?: boolean;
|
package/typings/config.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { Registry } from 'prom-client';
|
|
2
2
|
import { createCounter, createHistogram, createSummary } from './utils.js';
|
|
3
3
|
export type PrometheusTracingPluginConfig = {
|
|
4
|
-
requestCount?: boolean | string | ReturnType<typeof createCounter>;
|
|
5
|
-
requestTotalDuration?: boolean | string | ReturnType<typeof createHistogram>;
|
|
6
|
-
requestSummary?: boolean | string | ReturnType<typeof createSummary>;
|
|
7
|
-
parse?: boolean | string | ReturnType<typeof createHistogram>;
|
|
8
|
-
validate?: boolean | string | ReturnType<typeof createHistogram>;
|
|
9
|
-
contextBuilding?: boolean | string | ReturnType<typeof createHistogram>;
|
|
10
|
-
execute?: boolean | string | ReturnType<typeof createHistogram>;
|
|
11
|
-
subscribe?: boolean | string | ReturnType<typeof createHistogram>;
|
|
12
|
-
errors?: boolean | string | ReturnType<typeof createCounter>;
|
|
13
|
-
resolvers?: boolean | string | ReturnType<typeof createHistogram>;
|
|
14
|
-
resolversWhitelist?: string[];
|
|
15
|
-
deprecatedFields?: boolean | string | ReturnType<typeof createCounter>;
|
|
16
4
|
registry?: Registry;
|
|
17
5
|
skipIntrospection?: boolean;
|
|
18
|
-
|
|
6
|
+
graphql_envelop_request?: boolean | string | ReturnType<typeof createCounter>;
|
|
7
|
+
graphql_envelop_request_duration?: boolean | string | ReturnType<typeof createHistogram>;
|
|
8
|
+
graphql_envelop_request_time_summary?: boolean | string | ReturnType<typeof createSummary>;
|
|
9
|
+
graphql_envelop_phase_parse?: boolean | string | ReturnType<typeof createHistogram>;
|
|
10
|
+
graphql_envelop_phase_validate?: boolean | string | ReturnType<typeof createHistogram>;
|
|
11
|
+
graphql_envelop_phase_context?: boolean | string | ReturnType<typeof createHistogram>;
|
|
12
|
+
graphql_envelop_phase_execute?: boolean | string | ReturnType<typeof createHistogram>;
|
|
13
|
+
graphql_envelop_phase_subscribe?: boolean | string | ReturnType<typeof createHistogram>;
|
|
14
|
+
graphql_envelop_error_result?: boolean | string | ReturnType<typeof createCounter>;
|
|
15
|
+
graphql_envelop_deprecated_field?: boolean | string | ReturnType<typeof createCounter>;
|
|
16
|
+
graphql_envelop_schema_change?: boolean | string | ReturnType<typeof createCounter>;
|
|
17
|
+
graphql_envelop_execute_resolver?: boolean | string | ReturnType<typeof createHistogram>;
|
|
18
|
+
resolversWhitelist?: string[];
|
|
19
19
|
labels?: {
|
|
20
20
|
operationName?: boolean;
|
|
21
21
|
operationType?: boolean;
|
package/cjs/metrics.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/esm/metrics.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/typings/metrics.d.cts
DELETED
|
File without changes
|
package/typings/metrics.d.ts
DELETED
|
File without changes
|