instrumentation.ts 378 B

12345678910111213
  1. import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
  2. import { NodeSDK } from '@opentelemetry/sdk-node';
  3. import { getSdkConfiguration } from '@vendure/telemetry';
  4. const traceExporter = new OTLPTraceExporter({
  5. url: 'http://localhost:4318/v1/traces',
  6. });
  7. const config = getSdkConfiguration(true, true);
  8. const sdk = new NodeSDK(config);
  9. sdk.start();