@envelop/statsd 2.4.1 → 2.4.2-alpha-1eb54ef.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/package.json +4 -4
- package/typings/index.d.cts +29 -0
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envelop/statsd",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2-alpha-1eb54ef.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@envelop/core": "
|
|
6
|
+
"@envelop/core": "2.4.2-alpha-1eb54ef.0",
|
|
7
7
|
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
8
8
|
"hot-shots": "^8.0.0 || ^9.0.0"
|
|
9
9
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"exports": {
|
|
33
33
|
".": {
|
|
34
34
|
"require": {
|
|
35
|
-
"types": "./typings/index.d.
|
|
35
|
+
"types": "./typings/index.d.cts",
|
|
36
36
|
"default": "./cjs/index.js"
|
|
37
37
|
},
|
|
38
38
|
"import": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"./*": {
|
|
48
48
|
"require": {
|
|
49
|
-
"types": "./typings/*.d.
|
|
49
|
+
"types": "./typings/*.d.cts",
|
|
50
50
|
"default": "./cjs/*.js"
|
|
51
51
|
},
|
|
52
52
|
"import": {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Plugin } from '@envelop/core';
|
|
2
|
+
import type { StatsD } from 'hot-shots';
|
|
3
|
+
export interface StatsDPluginOptions {
|
|
4
|
+
client: StatsD;
|
|
5
|
+
/**
|
|
6
|
+
* If you wish to disable introspection logging (default: false)
|
|
7
|
+
*/
|
|
8
|
+
skipIntrospection?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* <prefix>.operations.count (default: graphql)
|
|
11
|
+
*/
|
|
12
|
+
prefix?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const metricNames: {
|
|
15
|
+
operationCount: string;
|
|
16
|
+
errorCount: string;
|
|
17
|
+
latency: string;
|
|
18
|
+
};
|
|
19
|
+
declare const statsDPluginTagsSymbol: unique symbol;
|
|
20
|
+
declare const statsDPluginExecutionStartTimeSymbol: unique symbol;
|
|
21
|
+
interface Tags {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
}
|
|
24
|
+
interface PluginInternalContext {
|
|
25
|
+
[statsDPluginTagsSymbol]: Tags;
|
|
26
|
+
[statsDPluginExecutionStartTimeSymbol]: number;
|
|
27
|
+
}
|
|
28
|
+
export declare const useStatsD: (options: StatsDPluginOptions) => Plugin<PluginInternalContext>;
|
|
29
|
+
export {};
|