@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 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, 'parse', typeof config.parse === 'string' ? config.parse : 'graphql_envelop_phase_parse', 'Time spent on running GraphQL "parse" function');
19
- const validateHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'validate', typeof config.validate === 'string' ? config.validate : 'graphql_envelop_phase_validate', 'Time spent on running GraphQL "validate" function');
20
- const contextBuildingHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'contextBuilding', typeof config.contextBuilding === 'string'
21
- ? config.contextBuilding
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, 'execute', typeof config.execute === 'string' ? config.execute : 'graphql_envelop_phase_execute', 'Time spent on running the GraphQL "execute" function');
24
- const subscribeHistogram = (0, utils_js_1.getHistogramFromConfig)(config, 'subscribe', typeof config.subscribe === 'string' ? config.subscribe : 'graphql_envelop_phase_subscribe', 'Time spent on running the GraphQL "subscribe" function');
25
- const resolversHistogram = typeof config.resolvers === 'object'
26
- ? config.resolvers
27
- : config.resolvers === true || typeof config.resolvers === 'string'
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.resolvers === 'string'
32
- ? config.resolvers
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.requestTotalDuration === 'object'
53
- ? config.requestTotalDuration
54
- : config.requestTotalDuration === true || typeof config.requestTotalDuration === 'string'
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.requestTotalDuration === 'string'
59
- ? config.requestTotalDuration
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.requestSummary === 'object'
71
- ? config.requestSummary
72
- : config.requestSummary === true || typeof config.requestSummary === 'string'
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.requestSummary === 'string'
77
- ? config.requestSummary
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.errors === 'object'
89
- ? config.errors
90
- : config.errors === true || typeof config.errors === 'string'
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.errors === 'string' ? config.errors : 'graphql_envelop_error_result',
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.requestCount === 'object'
107
- ? config.requestCount
108
- : config.requestCount === true || typeof config.requestCount === 'string'
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.requestCount === 'string'
113
- ? config.requestCount
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.deprecatedFields === 'object'
125
- ? config.deprecatedFields
126
- : config.deprecatedFields === true || typeof config.deprecatedFields === 'string'
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.deprecatedFields === 'string'
131
- ? config.deprecatedFields
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.schemaChangeCount === 'object'
145
- ? config.schemaChangeCount
146
- : config.schemaChangeCount === true || typeof config.schemaChangeCount === 'string'
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.schemaChangeCount === 'string'
151
- ? config.schemaChangeCount
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, 'parse', typeof config.parse === 'string' ? config.parse : 'graphql_envelop_phase_parse', 'Time spent on running GraphQL "parse" function');
14
- const validateHistogram = getHistogramFromConfig(config, 'validate', typeof config.validate === 'string' ? config.validate : 'graphql_envelop_phase_validate', 'Time spent on running GraphQL "validate" function');
15
- const contextBuildingHistogram = getHistogramFromConfig(config, 'contextBuilding', typeof config.contextBuilding === 'string'
16
- ? config.contextBuilding
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, 'execute', typeof config.execute === 'string' ? config.execute : 'graphql_envelop_phase_execute', 'Time spent on running the GraphQL "execute" function');
19
- const subscribeHistogram = getHistogramFromConfig(config, 'subscribe', typeof config.subscribe === 'string' ? config.subscribe : 'graphql_envelop_phase_subscribe', 'Time spent on running the GraphQL "subscribe" function');
20
- const resolversHistogram = typeof config.resolvers === 'object'
21
- ? config.resolvers
22
- : config.resolvers === true || typeof config.resolvers === 'string'
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.resolvers === 'string'
27
- ? config.resolvers
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.requestTotalDuration === 'object'
48
- ? config.requestTotalDuration
49
- : config.requestTotalDuration === true || typeof config.requestTotalDuration === 'string'
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.requestTotalDuration === 'string'
54
- ? config.requestTotalDuration
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.requestSummary === 'object'
66
- ? config.requestSummary
67
- : config.requestSummary === true || typeof config.requestSummary === 'string'
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.requestSummary === 'string'
72
- ? config.requestSummary
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.errors === 'object'
84
- ? config.errors
85
- : config.errors === true || typeof config.errors === 'string'
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.errors === 'string' ? config.errors : 'graphql_envelop_error_result',
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.requestCount === 'object'
102
- ? config.requestCount
103
- : config.requestCount === true || typeof config.requestCount === 'string'
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.requestCount === 'string'
108
- ? config.requestCount
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.deprecatedFields === 'object'
120
- ? config.deprecatedFields
121
- : config.deprecatedFields === true || typeof config.deprecatedFields === 'string'
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.deprecatedFields === 'string'
126
- ? config.deprecatedFields
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.schemaChangeCount === 'object'
140
- ? config.schemaChangeCount
141
- : config.schemaChangeCount === true || typeof config.schemaChangeCount === 'string'
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.schemaChangeCount === 'string'
146
- ? config.schemaChangeCount
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envelop/prometheus",
3
- "version": "10.0.0",
3
+ "version": "11.0.0-alpha-20240726191829-a22a25d0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@envelop/core": "^5.0.1",
@@ -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
- schemaChangeCount?: boolean | string | ReturnType<typeof createCounter>;
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;
@@ -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
- schemaChangeCount?: boolean | string | ReturnType<typeof createCounter>;
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";
File without changes
File without changes