@envelop/opentelemetry 9.1.1 → 9.2.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/LICENSE +3 -1
- package/cjs/index.js +6 -6
- package/esm/index.js +7 -7
- package/package.json +6 -6
- package/typings/has-inline-argument.d.cts +1 -1
- package/typings/has-inline-argument.d.ts +1 -1
- package/typings/index.d.cts +3 -2
- package/typings/index.d.ts +3 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2020
|
|
3
|
+
Copyright (c) 2018-2020 Graphcool
|
|
4
|
+
Copyright (c) 2020-2021 Prisma
|
|
5
|
+
Copyright (c) 2021- The Guild
|
|
4
6
|
|
|
5
7
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
8
|
of this software and associated documentation files (the "Software"), to deal
|
package/cjs/index.js
CHANGED
|
@@ -100,11 +100,11 @@ const useOpenTelemetry = (options, tracingProvider, spanKind = api_1.SpanKind.SE
|
|
|
100
100
|
if (options.variables) {
|
|
101
101
|
isDocumentLoggable = true;
|
|
102
102
|
}
|
|
103
|
-
else if (
|
|
104
|
-
isDocumentLoggable =
|
|
103
|
+
else if ((0, has_inline_argument_js_1.hasInlineArgument)(args.document)) {
|
|
104
|
+
isDocumentLoggable = false;
|
|
105
105
|
}
|
|
106
106
|
else {
|
|
107
|
-
isDocumentLoggable =
|
|
107
|
+
isDocumentLoggable = true;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
@@ -184,11 +184,11 @@ const useOpenTelemetry = (options, tracingProvider, spanKind = api_1.SpanKind.SE
|
|
|
184
184
|
if (options.variables) {
|
|
185
185
|
isDocumentLoggable = true;
|
|
186
186
|
}
|
|
187
|
-
else if (
|
|
188
|
-
isDocumentLoggable =
|
|
187
|
+
else if ((0, has_inline_argument_js_1.hasInlineArgument)(args.document)) {
|
|
188
|
+
isDocumentLoggable = false;
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
191
|
-
isDocumentLoggable =
|
|
191
|
+
isDocumentLoggable = true;
|
|
192
192
|
}
|
|
193
193
|
const currOtelContext = getCurrentOtelContext(args.contextValue);
|
|
194
194
|
const operationName = operationAst.name?.value || 'anonymous';
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getOperationAST, print } from 'graphql';
|
|
2
|
-
import { getDocumentString, isAsyncIterable
|
|
2
|
+
import { getDocumentString, isAsyncIterable } from '@envelop/core';
|
|
3
3
|
import { useOnResolve } from '@envelop/on-resolve';
|
|
4
4
|
import { SpanKind, SpanStatusCode } from '@opentelemetry/api';
|
|
5
5
|
import * as opentelemetry from '@opentelemetry/api';
|
|
@@ -94,11 +94,11 @@ export const useOpenTelemetry = (options, tracingProvider, spanKind = SpanKind.S
|
|
|
94
94
|
if (options.variables) {
|
|
95
95
|
isDocumentLoggable = true;
|
|
96
96
|
}
|
|
97
|
-
else if (
|
|
98
|
-
isDocumentLoggable =
|
|
97
|
+
else if (hasInlineArgument(args.document)) {
|
|
98
|
+
isDocumentLoggable = false;
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
|
-
isDocumentLoggable =
|
|
101
|
+
isDocumentLoggable = true;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
else {
|
|
@@ -178,11 +178,11 @@ export const useOpenTelemetry = (options, tracingProvider, spanKind = SpanKind.S
|
|
|
178
178
|
if (options.variables) {
|
|
179
179
|
isDocumentLoggable = true;
|
|
180
180
|
}
|
|
181
|
-
else if (
|
|
182
|
-
isDocumentLoggable =
|
|
181
|
+
else if (hasInlineArgument(args.document)) {
|
|
182
|
+
isDocumentLoggable = false;
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
|
-
isDocumentLoggable =
|
|
185
|
+
isDocumentLoggable = true;
|
|
186
186
|
}
|
|
187
187
|
const currOtelContext = getCurrentOtelContext(args.contextValue);
|
|
188
188
|
const operationName = operationAst.name?.value || 'anonymous';
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@envelop/opentelemetry",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
7
|
-
"@envelop/core": "^5.
|
|
6
|
+
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0",
|
|
7
|
+
"@envelop/core": "^5.6.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@opentelemetry/api": "^1.8.0",
|
|
11
11
|
"@opentelemetry/sdk-trace-base": "^1.11.0",
|
|
12
12
|
"tslib": "^2.5.0",
|
|
13
|
-
"@envelop/on-resolve": "^7.
|
|
13
|
+
"@envelop/on-resolve": "^7.2.0"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/graphql-hive/
|
|
18
|
-
"directory": "packages/plugins/opentelemetry"
|
|
17
|
+
"url": "https://github.com/graphql-hive/graphql-yoga.git",
|
|
18
|
+
"directory": "packages/envelop/plugins/opentelemetry"
|
|
19
19
|
},
|
|
20
20
|
"author": "Dotan Simha <dotansimha@gmail.com>",
|
|
21
21
|
"license": "MIT",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DocumentNode } from 'graphql';
|
|
1
|
+
import type { DocumentNode } from 'graphql';
|
|
2
2
|
export declare function hasInlineArgument(doc: DocumentNode): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DocumentNode } from 'graphql';
|
|
1
|
+
import type { DocumentNode } from 'graphql';
|
|
2
2
|
export declare function hasInlineArgument(doc: DocumentNode): boolean;
|
package/typings/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Plugin } from '@envelop/core';
|
|
2
|
-
import { SpanAttributes,
|
|
1
|
+
import type { Plugin } from '@envelop/core';
|
|
2
|
+
import type { SpanAttributes, TracerProvider } from '@opentelemetry/api';
|
|
3
|
+
import { SpanKind } from '@opentelemetry/api';
|
|
3
4
|
import * as opentelemetry from '@opentelemetry/api';
|
|
4
5
|
export declare enum AttributeName {
|
|
5
6
|
EXECUTION_ERROR = "graphql.execute.error",
|
package/typings/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Plugin } from '@envelop/core';
|
|
2
|
-
import { SpanAttributes,
|
|
1
|
+
import type { Plugin } from '@envelop/core';
|
|
2
|
+
import type { SpanAttributes, TracerProvider } from '@opentelemetry/api';
|
|
3
|
+
import { SpanKind } from '@opentelemetry/api';
|
|
3
4
|
import * as opentelemetry from '@opentelemetry/api';
|
|
4
5
|
export declare enum AttributeName {
|
|
5
6
|
EXECUTION_ERROR = "graphql.execute.error",
|