Skip to content

Commit

Permalink
Disable tracing to avoid error
Browse files Browse the repository at this point in the history
  • Loading branch information
Rindrics committed Nov 4, 2024
1 parent ebfe2d3 commit 2af6c8c
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions instrumentation.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ import {
LoggerProvider,
} from "@opentelemetry/sdk-logs";
import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics";
import {
ConsoleSpanExporter,
SimpleSpanProcessor,
} from "@opentelemetry/sdk-trace-base";
import { BatchSpanProcessor } from "@opentelemetry/sdk-trace-node";
import { registerOTel } from "@vercel/otel";

const headers = {
Expand All @@ -37,17 +32,6 @@ export const metricReader = new PeriodicExportingMetricReader({
exportIntervalMillis: 10000,
});

// Trace Exporter
const traceExporter = new OTLPTraceExporter({
url: "https://ingest.us.signoz.cloud:443/v1/traces",
headers,
});

const spanProcessor = new BatchSpanProcessor(traceExporter);

// For debug purposes, you can also use SimpleSpanProcessor with ConsoleSpanExporter
const debugSpanProcessor = new SimpleSpanProcessor(new ConsoleSpanExporter());

// Log Exporter
const logExporter = new OTLPLogExporter({
url: "https://ingest.us.signoz.cloud:443/v1/logs",
Expand All @@ -70,8 +54,6 @@ loggerProvider.addLogRecordProcessor(logRecordProcessor);
registerOTel({
serviceName: "giselle",
metricReader: metricReader,
spanProcessors: [spanProcessor, debugSpanProcessor],
traceExporter: traceExporter,
logRecordProcessor: logRecordProcessor,
});

Expand Down Expand Up @@ -102,7 +84,6 @@ export async function flushTelemetry() {
await Promise.all([
metricReader.forceFlush(),
loggerProvider.forceFlush(),
spanProcessor.forceFlush(),
new Promise((resolve) => setTimeout(resolve, 10000)), // wait for exporting
]);

Expand Down

0 comments on commit 2af6c8c

Please sign in to comment.