mirror of
https://github.com/graphql-hive/console
synced 2026-04-21 14:37:17 +00:00
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com> Co-authored-by: Dotan Simha <dotansimha@gmail.com> Co-authored-by: Denis Badurina <denis@denelop.com>
17 lines
579 B
TypeScript
17 lines
579 B
TypeScript
import { defineConfig } from '@graphql-hive/gateway';
|
|
import { hiveTracingSetup } from '@graphql-hive/plugin-opentelemetry/setup';
|
|
import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks'; // install
|
|
|
|
hiveTracingSetup({
|
|
contextManager: new AsyncLocalStorageContextManager(),
|
|
target: process.env.HIVE_TRACING_TARGET!,
|
|
accessToken: process.env.HIVE_TRACING_ACCESS_TOKEN!,
|
|
// optional, for self-hosting
|
|
endpoint: process.env.HIVE_TRACING_ENDPOINT!,
|
|
});
|
|
|
|
export const gatewayConfig = defineConfig({
|
|
openTelemetry: {
|
|
traces: true,
|
|
},
|
|
});
|