Skip to content

Commit afc7168

Browse files
authored
Revert "feat: upgrade hive gateway public api gateway" (#7058)
1 parent 4a55abf commit afc7168

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

deployment/config/public-graphql-api-gateway/gateway.config.ts

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
11
// @ts-expect-error not a dependency
2-
import { defineConfig } from '@graphql-hive/gateway';
3-
// @ts-expect-error not a dependency
4-
import { openTelemetrySetup } from '@graphql-hive/gateway/opentelemetry/setup';
5-
import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
6-
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
7-
8-
openTelemetrySetup({
9-
// Mandatory: It depends on the available API in your runtime.
10-
// We recommend AsyncLocalStorage based manager when possible.
11-
// `@opentelemetry/context-zone` is also available for other runtimes.
12-
// Pass `false` to disable context manager usage.
13-
contextManager: new AsyncLocalStorageContextManager(),
14-
15-
traces: {
16-
// Define your exporter, most of the time the OTLP HTTP one. Traces are batched by default.
17-
exporter: new OTLPTraceExporter({ url: process.env['OPENTELEMETRY_COLLECTOR_ENDPOINT']! }),
18-
// You can easily enable a console exporter for quick debug
19-
console: process.env['DEBUG_TRACES'] === '1',
20-
},
21-
});
2+
import { createOtlpHttpExporter, defineConfig } from '@graphql-hive/gateway';
223

234
const defaultQuery = `#
245
# Welcome to the Hive Console GraphQL API.
@@ -53,6 +34,11 @@ export const gatewayConfig = defineConfig({
5334
openTelemetry: process.env['OPENTELEMETRY_COLLECTOR_ENDPOINT']
5435
? {
5536
serviceName: 'public-graphql-api-gateway',
37+
exporters: [
38+
createOtlpHttpExporter({
39+
url: process.env['OPENTELEMETRY_COLLECTOR_ENDPOINT'],
40+
}),
41+
],
5642
}
5743
: false,
5844
demandControl: {

deployment/services/public-graphql-api-gateway.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@ import { type Observability } from './observability';
1414
* Hive Gateway Docker Image Version
1515
* Bump this to update the used gateway version.
1616
*/
17-
const dockerImage = 'ghcr.io/graphql-hive/gateway:2.1.7';
17+
const dockerImage = 'ghcr.io/graphql-hive/gateway:1.13.6';
1818

1919
const gatewayConfigDirectory = path.resolve(
2020
__dirname,
2121
'..',
2222
'config',
2323
'public-graphql-api-gateway',
2424
);
25-
26-
// On global scope to fail early in case of a read error
2725
const gatewayConfigPath = path.join(gatewayConfigDirectory, 'gateway.config.ts');
26+
// On global scope to fail early in case of a read error
2827
const gwConfigFile = fs.readFileSync(gatewayConfigPath, 'utf-8');
2928

3029
export function deployPublicGraphQLAPIGateway(args: {

0 commit comments

Comments
 (0)