@graphql-hive/plugin-opentelemetry 1.0.0-alpha-2cea6e8a62aea3e45963d47c35cb6db588d78c54

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/CHANGELOG.md ADDED
@@ -0,0 +1,215 @@
1
+ # @graphql-hive/plugin-opentelemetry
2
+
3
+ ## 1.0.0-alpha-2cea6e8a62aea3e45963d47c35cb6db588d78c54
4
+ ### Major Changes
5
+
6
+
7
+
8
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`22bd3f7`](https://github.com/graphql-hive/gateway/commit/22bd3f70d2901738d4c35e02282569546b820b11) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Drop Node 18 support
9
+
10
+ Least supported Node version is now v20.
11
+
12
+
13
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`5cbfc38`](https://github.com/graphql-hive/gateway/commit/5cbfc389021dcf616402788080ffb56b69ff6019) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - This plugin has been renamed from `@graphql-mesh/plugin-opentelemetry` to `@graphql-hive/plugin-opentelemetry`
14
+
15
+ `@graphql-mesh/plugin-opentelemetry` is now deprecated and you are advised to upgrade and use the new `@graphql-hive/plugin-opentelemetry`. Please find the necessary documentation on the [Hive Gateway documentation website](https://the-guild.dev/graphql/hive/docs/gateway).
16
+
17
+ ```diff
18
+ - @graphql-mesh/plugin-opentelemetry
19
+ + @graphql-hive/plugin-opentelemetry
20
+ ```
21
+
22
+
23
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`01c414f`](https://github.com/graphql-hive/gateway/commit/01c414f6c50edeb1b8dfd09386a12e0499835355) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Introduce and use the new Hive Logger
24
+
25
+ - [Read more about it on the Hive Logger documentation here.](https://the-guild.dev/graphql/hive/docs/logger)
26
+
27
+ - If coming from Hive Gateway v1, [read the migration guide here.](https://the-guild.dev/graphql/hive/docs/migration-guides/gateway-v1-v2)
28
+
29
+
30
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`c84b36e`](https://github.com/graphql-hive/gateway/commit/c84b36e1125a8ab3bd8e988be285b96c8545073d) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - The OpenTelemetry integration have been entirely overhauled.
31
+
32
+ **This Release contains breaking changes, please read [Breaking Changes](#breaking-changes) section below**
33
+
34
+ ## Improvements
35
+
36
+ ### Span parenting
37
+
38
+ The spans of the different phases of the request handling have been fixed.
39
+
40
+ Now, spans are parented as expected, and Hive Gateway is now compatible with Grafana's "critical path" feature.
41
+
42
+ #### Context Manager
43
+
44
+ By default, if `initializeNodeSDK` is `true` (default), the plugin will try to install an `AsyncLocalStorage` based Context Manager.
45
+
46
+ You can configure an alternative context manager (or entirely disable it) with `contextManager` new option.
47
+
48
+ #### Extended span coverage
49
+
50
+ Spans also now covers the entire duration of each phases, including the plugin hooks execution.
51
+
52
+ ### Custom spans and standard instrumentation support
53
+
54
+ We are now fully compatible with OpenTelemetry Context, meaning you can now create custom spans
55
+ inside your plugins, or enable standard OTEL instrumentation like Node SDK.
56
+
57
+ The custom spans will be parented correctly thanks to OTEL Context.
58
+
59
+ ```ts
60
+ const useMyPlugin = () => {
61
+ const tracer = otel.trace.getTracer('hive-gateway');
62
+ return {
63
+ async onExecute() {
64
+ await otel.startActiveSpan('my-custom-span', async () => {
65
+ // do something
66
+ });
67
+ },
68
+ };
69
+ };
70
+ ```
71
+
72
+ You can also enable Node SDK standard instrumentations (or instrumentation specific to your runtime).
73
+ They will also be parented correctly:
74
+
75
+ ```ts
76
+ // otel-setup.ts
77
+ import otel from '@opentelemetry/api';
78
+ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
79
+ import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
80
+ import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
81
+ import { NodeSDK } from '@opentelemetry/sdk-node';
82
+ import './setup.js';
83
+ import { defineConfig } from '@graphql-hive/gateway';
84
+
85
+ const sdk = new NodeSDK({
86
+ traceExporter: new OTLPTraceExporter({
87
+ url: 'http://localhost:4318/v1/traces',
88
+ }),
89
+ // Enable Node standard instrumentations
90
+ instrumentations: [getNodeAutoInstrumentations()],
91
+ serviceName: 'hive-gateway',
92
+ });
93
+
94
+ sdk.start();
95
+
96
+ // This is required for the OTEL context to be properly propagated and spans correlated with Hive's integration.
97
+ otel.context.setGlobalContextManager(new AsyncLocalStorageContextManager());
98
+
99
+ // gateway.config.ts
100
+ import { defineConfig } from '@graphql-hive/gateway';
101
+
102
+ export const gatewayConfig = defineConfig({
103
+ opentelemetry: {
104
+ initializeNodeSDK: false,
105
+ },
106
+ });
107
+ ```
108
+
109
+ ### New `graphql.operation` span with Batched Queries support
110
+
111
+ The plugin now exports a new span `graphql.operation <Operation Name>` which represent the handling of a graphql operation.
112
+
113
+ This enables the support of Batched queries. If enabled the root `POST /graphql` span will contain
114
+ one `graphql.operation <Operation Name>` span for each graphql operation contained in the HTTP request.
115
+
116
+ ### Support of Upstream Retry
117
+
118
+ The plugin now support standard OTEL attribute for request retry (`http.request.resend_count`).
119
+
120
+ If enabled, you will see one `http.fetch` span for each try under `subgraph.execute (<subgraph name>)` spans.
121
+
122
+ ### Support of custom attributes
123
+
124
+ Thanks to OTEL Context, you can now add custom attributes to the current span:
125
+
126
+ ```ts
127
+ import otel from '@opentelemetry/api'
128
+
129
+ const useMyPlugin = () => ({
130
+ async onRequestParse({ request }) => ({
131
+ const userId = await getUserIdForRequest(request);
132
+ otel.trace.getSpan()?.setAttribute('user_id', userId);
133
+ })
134
+ })
135
+ ```
136
+
137
+ ## Breaking Changes
138
+
139
+ ### Spans Parenting
140
+
141
+ Spans are now parented correctly, which can break your Grafana (or other visualization and alerting tools) setup.
142
+ Please carefully review your span queries to check if they rely on span parent.
143
+
144
+ ### Spans configuration
145
+
146
+ Spans can be skipped based on the result of a predicate function. The parameter of those functions have been narrowed down, and contains less data.
147
+
148
+ If your configuration contains skip functions, please review the types to adapt to the new API.
149
+
150
+ ### Async Local Storage Context Manager
151
+
152
+ When `initializeNodeSDK` is set to `true` (the default), the plugin tries to enable an Async Local Storage based Context Manager.
153
+ This is needed to ensure correct correlation of spans created outside of the plugin.
154
+
155
+ While this should not break anything, the usage of `AsyncLocalStorage` can slightly reduce performances of the Gateway.
156
+
157
+ If you don't need to correlate with any OTEL official instrumentations or don't need OTEL context for custom spans, you can disable it by setting the `contextManager` option:
158
+
159
+ ```ts
160
+ import { defineConfig } from '@graphql-hive/gateway';
161
+
162
+ export const gatewayConfig = defineConfig({
163
+ opentelemetry: {
164
+ contextManager: false,
165
+ },
166
+ });
167
+ ```
168
+
169
+
170
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`b4f5042`](https://github.com/graphql-hive/gateway/commit/b4f5042c2f152252918a8814d060e39cb9551cdd) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - **Breaking Change**: Removal of the Azure exporter (`createAzureMonitorExporter`). Please use `@azure/monitor-opentelemetry-exporter` directly instead.
171
+
172
+
173
+ ### Minor Changes
174
+
175
+
176
+
177
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`44530c2`](https://github.com/graphql-hive/gateway/commit/44530c2713a1039e420a793c76fc4dc2231b936e) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Add a configurable sampling rate. The sampling strategy relies on a determenistic probability sampler with a parent priority, meaning that if a span is sampled, all its children spans will also be sampled.
178
+
179
+
180
+
181
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`00047fd`](https://github.com/graphql-hive/gateway/commit/00047fd581f257d8be5499a25ee80425fb01fc85) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Add support of Yoga. This plugin is now usable in Yoga too, which allows for better opentelemetry traces in subgraphs.
182
+
183
+
184
+ ### Patch Changes
185
+
186
+
187
+
188
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`475ef5c`](https://github.com/graphql-hive/gateway/commit/475ef5cad6c7b7328a18e4d6b851bbcafb09d1a1) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - dependencies updates:
189
+
190
+ - Updated dependency [`@opentelemetry/core@^2.0.1` ↗︎](https://www.npmjs.com/package/@opentelemetry/core/v/2.0.1) (from `^1.30.0`, in `dependencies`)
191
+ - Updated dependency [`@opentelemetry/exporter-trace-otlp-grpc@^0.203.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-grpc/v/0.203.0) (from `^0.57.0`, in `dependencies`)
192
+ - Updated dependency [`@opentelemetry/exporter-trace-otlp-http@^0.203.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-http/v/0.203.0) (from `^0.57.0`, in `dependencies`)
193
+ - Updated dependency [`@opentelemetry/instrumentation@^0.203.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/instrumentation/v/0.203.0) (from `^0.57.0`, in `dependencies`)
194
+ - Updated dependency [`@opentelemetry/resources@^2.0.1` ↗︎](https://www.npmjs.com/package/@opentelemetry/resources/v/2.0.1) (from `^1.29.0`, in `dependencies`)
195
+ - Updated dependency [`@opentelemetry/sdk-trace-base@^2.0.1` ↗︎](https://www.npmjs.com/package/@opentelemetry/sdk-trace-base/v/2.0.1) (from `^1.29.0`, in `dependencies`)
196
+ - Updated dependency [`@opentelemetry/semantic-conventions@^1.36.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/semantic-conventions/v/1.36.0) (from `^1.28.0`, in `dependencies`)
197
+ - Updated dependency [`@whatwg-node/promise-helpers@1.3.0` ↗︎](https://www.npmjs.com/package/@whatwg-node/promise-helpers/v/1.3.0) (from `^1.3.0`, in `dependencies`)
198
+ - Added dependency [`@graphql-hive/core@^0.13.0` ↗︎](https://www.npmjs.com/package/@graphql-hive/core/v/0.13.0) (to `dependencies`)
199
+ - Added dependency [`@graphql-hive/logger@workspace:^` ↗︎](https://www.npmjs.com/package/@graphql-hive/logger/v/workspace:^) (to `dependencies`)
200
+ - Added dependency [`@opentelemetry/api-logs@^0.203.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/api-logs/v/0.203.0) (to `dependencies`)
201
+ - Added dependency [`@opentelemetry/auto-instrumentations-node@^0.62.1` ↗︎](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node/v/0.62.1) (to `dependencies`)
202
+ - Added dependency [`@opentelemetry/context-async-hooks@^2.0.1` ↗︎](https://www.npmjs.com/package/@opentelemetry/context-async-hooks/v/2.0.1) (to `dependencies`)
203
+ - Added dependency [`@opentelemetry/sdk-logs@^0.203.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/sdk-logs/v/0.203.0) (to `dependencies`)
204
+ - Added dependency [`@opentelemetry/sdk-node@^0.203.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/sdk-node/v/0.203.0) (to `dependencies`)
205
+ - Removed dependency [`@azure/monitor-opentelemetry-exporter@^1.0.0-beta.27` ↗︎](https://www.npmjs.com/package/@azure/monitor-opentelemetry-exporter/v/1.0.0) (from `dependencies`)
206
+ - Removed dependency [`@opentelemetry/exporter-zipkin@^1.29.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/exporter-zipkin/v/1.29.0) (from `dependencies`)
207
+ - Removed dependency [`@opentelemetry/sdk-trace-web@^1.29.0` ↗︎](https://www.npmjs.com/package/@opentelemetry/sdk-trace-web/v/1.29.0) (from `dependencies`)
208
+
209
+
210
+ - [#956](https://github.com/graphql-hive/gateway/pull/956) [`5dee497`](https://github.com/graphql-hive/gateway/commit/5dee497a3a2908bd2c18b8f50c1c9226023abe1f) Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Fix the types exporters factories, the configuration is actually optional. All parameters can be determined from environement variables.
211
+
212
+ - Updated dependencies [[`01c414f`](https://github.com/graphql-hive/gateway/commit/01c414f6c50edeb1b8dfd09386a12e0499835355), [`f09c4a7`](https://github.com/graphql-hive/gateway/commit/f09c4a74e37c29d4a44cc5612078754e38e54c4a), [`dafd3a1`](https://github.com/graphql-hive/gateway/commit/dafd3a17f02cb85963d6004665017e4733f14fb8), [`91e0764`](https://github.com/graphql-hive/gateway/commit/91e0764ceed0e892cfbe93f8d6e1353fadfa0f8a), [`01c414f`](https://github.com/graphql-hive/gateway/commit/01c414f6c50edeb1b8dfd09386a12e0499835355), [`91e0764`](https://github.com/graphql-hive/gateway/commit/91e0764ceed0e892cfbe93f8d6e1353fadfa0f8a), [`22bd3f7`](https://github.com/graphql-hive/gateway/commit/22bd3f70d2901738d4c35e02282569546b820b11), [`01c414f`](https://github.com/graphql-hive/gateway/commit/01c414f6c50edeb1b8dfd09386a12e0499835355), [`f238e21`](https://github.com/graphql-hive/gateway/commit/f238e215ef5ac9b8c93458d4889bf80f85a574ed), [`f238e21`](https://github.com/graphql-hive/gateway/commit/f238e215ef5ac9b8c93458d4889bf80f85a574ed), [`76073af`](https://github.com/graphql-hive/gateway/commit/76073af61b408de42c85f21696cf20a0d97e4027), [`01c414f`](https://github.com/graphql-hive/gateway/commit/01c414f6c50edeb1b8dfd09386a12e0499835355), [`61f45a1`](https://github.com/graphql-hive/gateway/commit/61f45a13e1175bfb30fbd397604c92ee1fd19a1a)]:
213
+ - @graphql-hive/gateway-runtime@2.0.0-alpha-2cea6e8a62aea3e45963d47c35cb6db588d78c54
214
+ - @graphql-mesh/transport-common@1.0.0-alpha-2cea6e8a62aea3e45963d47c35cb6db588d78c54
215
+ - @graphql-hive/logger@1.0.1-alpha-2cea6e8a62aea3e45963d47c35cb6db588d78c54
package/dist/api.cjs ADDED
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var api = require('@opentelemetry/api');
4
+
5
+ const defaultDelegate = {
6
+ getActiveContext: () => api.context.active(),
7
+ getExecutionRequestContext: () => api.context.active(),
8
+ getHttpContext: () => api.context.active(),
9
+ getOperationContext: () => api.context.active(),
10
+ tracer: void 0
11
+ };
12
+ let delegate = defaultDelegate;
13
+ const hive = {
14
+ getActiveContext: (payload) => delegate.getActiveContext(payload),
15
+ getExecutionRequestContext: (executionRequest) => delegate.getExecutionRequestContext(executionRequest),
16
+ getHttpContext: (request) => delegate.getHttpContext(request),
17
+ getOperationContext: (context2) => delegate.getOperationContext(context2),
18
+ get tracer() {
19
+ return delegate.tracer;
20
+ },
21
+ setPluginUtils: (utils, log) => {
22
+ if (delegate == defaultDelegate) {
23
+ delegate = utils;
24
+ return true;
25
+ } else {
26
+ log?.warn(
27
+ "OpenTelemetry plugin's utils are already registered. This is a no-op"
28
+ );
29
+ return false;
30
+ }
31
+ },
32
+ disable() {
33
+ delegate = defaultDelegate;
34
+ }
35
+ };
36
+
37
+ exports.hive = hive;
38
+ Object.keys(api).forEach(function (k) {
39
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
40
+ enumerable: true,
41
+ get: function () { return api[k]; }
42
+ });
43
+ });
package/dist/api.d.cts ADDED
@@ -0,0 +1,32 @@
1
+ import { Logger } from '@graphql-hive/logger';
2
+ import { Tracer } from '@opentelemetry/api';
3
+ export * from '@opentelemetry/api';
4
+ import { c as OpenTelemetryPluginUtils } from './plugin-Cn24wGGV.js';
5
+ import '@graphql-hive/gateway-runtime';
6
+ import '@graphql-tools/utils';
7
+ import 'graphql';
8
+
9
+ type HiveAPI = Omit<OpenTelemetryPluginUtils, 'tracer'> & {
10
+ /**
11
+ * The tracer used by the OpenTelemetry plugin.
12
+ * Note: It will stay undefined until the plugin is actually instantiated.
13
+ * **This means it is not usable at import time**, please use your own `Tracer` in this case.
14
+ * You can provide a custom tracer in {@link OpenTelemetryGatewayPluginOptions.traces the plugin options}.
15
+ */
16
+ tracer: Tracer | undefined;
17
+ /**
18
+ * Register the Hive OpenTelemetry plugin utility API
19
+ *
20
+ * @param utils - The plugin instance with all the utility methods
21
+ * @param log - A Logger that will be used to warn in case of double registration. Leave it undefined or null to disable the log.
22
+ * @returns `true` - if successful, `false` if the API was already registered
23
+ */
24
+ setPluginUtils(utils: OpenTelemetryPluginUtils, log?: Logger): boolean;
25
+ /**
26
+ * Unregister the current Hive OpenTelemetry plugin utility API if any is registered. No-op if no API was registered.
27
+ */
28
+ disable(): void;
29
+ };
30
+ declare const hive: HiveAPI;
31
+
32
+ export { type HiveAPI, hive };
package/dist/api.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ import { Logger } from '@graphql-hive/logger';
2
+ import { Tracer } from '@opentelemetry/api';
3
+ export * from '@opentelemetry/api';
4
+ import { c as OpenTelemetryPluginUtils } from './plugin-Cn24wGGV.js';
5
+ import '@graphql-hive/gateway-runtime';
6
+ import '@graphql-tools/utils';
7
+ import 'graphql';
8
+
9
+ type HiveAPI = Omit<OpenTelemetryPluginUtils, 'tracer'> & {
10
+ /**
11
+ * The tracer used by the OpenTelemetry plugin.
12
+ * Note: It will stay undefined until the plugin is actually instantiated.
13
+ * **This means it is not usable at import time**, please use your own `Tracer` in this case.
14
+ * You can provide a custom tracer in {@link OpenTelemetryGatewayPluginOptions.traces the plugin options}.
15
+ */
16
+ tracer: Tracer | undefined;
17
+ /**
18
+ * Register the Hive OpenTelemetry plugin utility API
19
+ *
20
+ * @param utils - The plugin instance with all the utility methods
21
+ * @param log - A Logger that will be used to warn in case of double registration. Leave it undefined or null to disable the log.
22
+ * @returns `true` - if successful, `false` if the API was already registered
23
+ */
24
+ setPluginUtils(utils: OpenTelemetryPluginUtils, log?: Logger): boolean;
25
+ /**
26
+ * Unregister the current Hive OpenTelemetry plugin utility API if any is registered. No-op if no API was registered.
27
+ */
28
+ disable(): void;
29
+ };
30
+ declare const hive: HiveAPI;
31
+
32
+ export { type HiveAPI, hive };
package/dist/api.js ADDED
@@ -0,0 +1,36 @@
1
+ import { context } from '@opentelemetry/api';
2
+ export * from '@opentelemetry/api';
3
+
4
+ const defaultDelegate = {
5
+ getActiveContext: () => context.active(),
6
+ getExecutionRequestContext: () => context.active(),
7
+ getHttpContext: () => context.active(),
8
+ getOperationContext: () => context.active(),
9
+ tracer: void 0
10
+ };
11
+ let delegate = defaultDelegate;
12
+ const hive = {
13
+ getActiveContext: (payload) => delegate.getActiveContext(payload),
14
+ getExecutionRequestContext: (executionRequest) => delegate.getExecutionRequestContext(executionRequest),
15
+ getHttpContext: (request) => delegate.getHttpContext(request),
16
+ getOperationContext: (context2) => delegate.getOperationContext(context2),
17
+ get tracer() {
18
+ return delegate.tracer;
19
+ },
20
+ setPluginUtils: (utils, log) => {
21
+ if (delegate == defaultDelegate) {
22
+ delegate = utils;
23
+ return true;
24
+ } else {
25
+ log?.warn(
26
+ "OpenTelemetry plugin's utils are already registered. This is a no-op"
27
+ );
28
+ return false;
29
+ }
30
+ },
31
+ disable() {
32
+ delegate = defaultDelegate;
33
+ }
34
+ };
35
+
36
+ export { hive };
@@ -0,0 +1,10 @@
1
+ declare const SEMATTRS_GRAPHQL_DOCUMENT = "graphql.document";
2
+ declare const SEMATTRS_GRAPHQL_OPERATION_TYPE = "graphql.operation.type";
3
+ declare const SEMATTRS_GRAPHQL_OPERATION_NAME = "graphql.operation.name";
4
+ declare const SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH = "hive.graphql.operation.hash";
5
+ declare const SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT = "hive.graphql.error.count";
6
+ declare const SEMATTRS_HIVE_GRAPHQL_ERROR_CODES = "hive.graphql.error.codes";
7
+ declare const SEMATTRS_HIVE_GATEWAY_UPSTREAM_SUBGRAPH_NAME = "hive.gateway.upstream.subgraph.name";
8
+ declare const SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES = "hive.gateway.operation.subgraph.names";
9
+
10
+ export { SEMATTRS_GRAPHQL_DOCUMENT as S, SEMATTRS_GRAPHQL_OPERATION_TYPE as a, SEMATTRS_GRAPHQL_OPERATION_NAME as b, SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH as c, SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT as d, SEMATTRS_HIVE_GRAPHQL_ERROR_CODES as e, SEMATTRS_HIVE_GATEWAY_UPSTREAM_SUBGRAPH_NAME as f, SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES as g };
package/dist/index.cjs ADDED
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ var plugin = require('./plugin-BT_oWPcx.cjs');
4
+ var api = require('@opentelemetry/api');
5
+ var semanticConventions = require('@opentelemetry/semantic-conventions');
6
+ require('@graphql-hive/gateway-runtime');
7
+ require('@graphql-mesh/utils');
8
+ require('@graphql-tools/utils');
9
+ require('@opentelemetry/core');
10
+ require('@whatwg-node/promise-helpers');
11
+ require('./api.cjs');
12
+ require('@graphql-hive/core');
13
+ require('@graphql-mesh/transport-common');
14
+ require('graphql');
15
+
16
+
17
+
18
+ exports.SEMATTRS_GRAPHQL_DOCUMENT = plugin.SEMATTRS_GRAPHQL_DOCUMENT;
19
+ exports.SEMATTRS_GRAPHQL_OPERATION_NAME = plugin.SEMATTRS_GRAPHQL_OPERATION_NAME;
20
+ exports.SEMATTRS_GRAPHQL_OPERATION_TYPE = plugin.SEMATTRS_GRAPHQL_OPERATION_TYPE;
21
+ exports.SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES = plugin.SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES;
22
+ exports.SEMATTRS_HIVE_GATEWAY_UPSTREAM_SUBGRAPH_NAME = plugin.SEMATTRS_HIVE_GATEWAY_UPSTREAM_SUBGRAPH_NAME;
23
+ exports.SEMATTRS_HIVE_GRAPHQL_ERROR_CODES = plugin.SEMATTRS_HIVE_GRAPHQL_ERROR_CODES;
24
+ exports.SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT = plugin.SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT;
25
+ exports.SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH = plugin.SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH;
26
+ exports.useOpenTelemetry = plugin.useOpenTelemetry;
27
+ Object.defineProperty(exports, "OpenTelemetryDiagLogLevel", {
28
+ enumerable: true,
29
+ get: function () { return api.DiagLogLevel; }
30
+ });
31
+ Object.defineProperty(exports, "ATTR_SERVICE_NAME", {
32
+ enumerable: true,
33
+ get: function () { return semanticConventions.ATTR_SERVICE_NAME; }
34
+ });
35
+ Object.defineProperty(exports, "ATTR_SERVICE_VERSION", {
36
+ enumerable: true,
37
+ get: function () { return semanticConventions.ATTR_SERVICE_VERSION; }
38
+ });
39
+ Object.defineProperty(exports, "SEMATTRS_HTTP_CLIENT_IP", {
40
+ enumerable: true,
41
+ get: function () { return semanticConventions.SEMATTRS_HTTP_CLIENT_IP; }
42
+ });
43
+ Object.defineProperty(exports, "SEMATTRS_HTTP_HOST", {
44
+ enumerable: true,
45
+ get: function () { return semanticConventions.SEMATTRS_HTTP_HOST; }
46
+ });
47
+ Object.defineProperty(exports, "SEMATTRS_HTTP_METHOD", {
48
+ enumerable: true,
49
+ get: function () { return semanticConventions.SEMATTRS_HTTP_METHOD; }
50
+ });
51
+ Object.defineProperty(exports, "SEMATTRS_HTTP_ROUTE", {
52
+ enumerable: true,
53
+ get: function () { return semanticConventions.SEMATTRS_HTTP_ROUTE; }
54
+ });
55
+ Object.defineProperty(exports, "SEMATTRS_HTTP_SCHEME", {
56
+ enumerable: true,
57
+ get: function () { return semanticConventions.SEMATTRS_HTTP_SCHEME; }
58
+ });
59
+ Object.defineProperty(exports, "SEMATTRS_HTTP_SERVER_NAME", {
60
+ enumerable: true,
61
+ get: function () { return semanticConventions.SEMATTRS_HTTP_SERVER_NAME; }
62
+ });
63
+ Object.defineProperty(exports, "SEMATTRS_HTTP_STATUS_CODE", {
64
+ enumerable: true,
65
+ get: function () { return semanticConventions.SEMATTRS_HTTP_STATUS_CODE; }
66
+ });
67
+ Object.defineProperty(exports, "SEMATTRS_HTTP_URL", {
68
+ enumerable: true,
69
+ get: function () { return semanticConventions.SEMATTRS_HTTP_URL; }
70
+ });
71
+ Object.defineProperty(exports, "SEMATTRS_HTTP_USER_AGENT", {
72
+ enumerable: true,
73
+ get: function () { return semanticConventions.SEMATTRS_HTTP_USER_AGENT; }
74
+ });
75
+ Object.defineProperty(exports, "SEMATTRS_NET_HOST_NAME", {
76
+ enumerable: true,
77
+ get: function () { return semanticConventions.SEMATTRS_NET_HOST_NAME; }
78
+ });
@@ -0,0 +1,7 @@
1
+ export { O as OpenTelemetryContextExtension, a as OpenTelemetryGatewayPluginOptions, b as OpenTelemetryPlugin, c as OpenTelemetryPluginUtils, u as useOpenTelemetry } from './plugin-Cn24wGGV.js';
2
+ export { DiagLogLevel as OpenTelemetryDiagLogLevel } from '@opentelemetry/api';
3
+ export { S as SEMATTRS_GRAPHQL_DOCUMENT, b as SEMATTRS_GRAPHQL_OPERATION_NAME, a as SEMATTRS_GRAPHQL_OPERATION_TYPE, g as SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES, f as SEMATTRS_HIVE_GATEWAY_UPSTREAM_SUBGRAPH_NAME, e as SEMATTRS_HIVE_GRAPHQL_ERROR_CODES, d as SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT, c as SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH } from './attributes-mikIPKnv.js';
4
+ export { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION, SEMATTRS_HTTP_CLIENT_IP, SEMATTRS_HTTP_HOST, SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_ROUTE, SEMATTRS_HTTP_SCHEME, SEMATTRS_HTTP_SERVER_NAME, SEMATTRS_HTTP_STATUS_CODE, SEMATTRS_HTTP_URL, SEMATTRS_HTTP_USER_AGENT, SEMATTRS_NET_HOST_NAME } from '@opentelemetry/semantic-conventions';
5
+ import '@graphql-hive/gateway-runtime';
6
+ import '@graphql-tools/utils';
7
+ import 'graphql';
@@ -0,0 +1,7 @@
1
+ export { O as OpenTelemetryContextExtension, a as OpenTelemetryGatewayPluginOptions, b as OpenTelemetryPlugin, c as OpenTelemetryPluginUtils, u as useOpenTelemetry } from './plugin-Cn24wGGV.js';
2
+ export { DiagLogLevel as OpenTelemetryDiagLogLevel } from '@opentelemetry/api';
3
+ export { S as SEMATTRS_GRAPHQL_DOCUMENT, b as SEMATTRS_GRAPHQL_OPERATION_NAME, a as SEMATTRS_GRAPHQL_OPERATION_TYPE, g as SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES, f as SEMATTRS_HIVE_GATEWAY_UPSTREAM_SUBGRAPH_NAME, e as SEMATTRS_HIVE_GRAPHQL_ERROR_CODES, d as SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT, c as SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH } from './attributes-mikIPKnv.js';
4
+ export { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION, SEMATTRS_HTTP_CLIENT_IP, SEMATTRS_HTTP_HOST, SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_ROUTE, SEMATTRS_HTTP_SCHEME, SEMATTRS_HTTP_SERVER_NAME, SEMATTRS_HTTP_STATUS_CODE, SEMATTRS_HTTP_URL, SEMATTRS_HTTP_USER_AGENT, SEMATTRS_NET_HOST_NAME } from '@opentelemetry/semantic-conventions';
5
+ import '@graphql-hive/gateway-runtime';
6
+ import '@graphql-tools/utils';
7
+ import 'graphql';
package/dist/index.js ADDED
@@ -0,0 +1,12 @@
1
+ export { S as SEMATTRS_GRAPHQL_DOCUMENT, b as SEMATTRS_GRAPHQL_OPERATION_NAME, a as SEMATTRS_GRAPHQL_OPERATION_TYPE, g as SEMATTRS_HIVE_GATEWAY_OPERATION_SUBGRAPH_NAMES, f as SEMATTRS_HIVE_GATEWAY_UPSTREAM_SUBGRAPH_NAME, e as SEMATTRS_HIVE_GRAPHQL_ERROR_CODES, d as SEMATTRS_HIVE_GRAPHQL_ERROR_COUNT, c as SEMATTRS_HIVE_GRAPHQL_OPERATION_HASH, u as useOpenTelemetry } from './plugin-DUMSBw0j.js';
2
+ export { DiagLogLevel as OpenTelemetryDiagLogLevel } from '@opentelemetry/api';
3
+ export { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION, SEMATTRS_HTTP_CLIENT_IP, SEMATTRS_HTTP_HOST, SEMATTRS_HTTP_METHOD, SEMATTRS_HTTP_ROUTE, SEMATTRS_HTTP_SCHEME, SEMATTRS_HTTP_SERVER_NAME, SEMATTRS_HTTP_STATUS_CODE, SEMATTRS_HTTP_URL, SEMATTRS_HTTP_USER_AGENT, SEMATTRS_NET_HOST_NAME } from '@opentelemetry/semantic-conventions';
4
+ import '@graphql-hive/gateway-runtime';
5
+ import '@graphql-mesh/utils';
6
+ import '@graphql-tools/utils';
7
+ import '@opentelemetry/core';
8
+ import '@whatwg-node/promise-helpers';
9
+ import './api.js';
10
+ import '@graphql-hive/core';
11
+ import '@graphql-mesh/transport-common';
12
+ import 'graphql';