console/configs/gateway.config.ts
Laurin Quast 4f70fc9555
feat: otel telemetry collection and dashboard (#6796)
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>
2025-10-10 14:06:02 +02:00

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,
},
});