Skip to content

Commit cdcd9dd

Browse files
committed
fix typecheck
1 parent 680e0a1 commit cdcd9dd

3 files changed

Lines changed: 1 addition & 28 deletions

File tree

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Main entry point for the package
22
export { applyPatches } from "./patch-n8n.js";
3-
export { setupObservability, shutdownObservability, flushObservability } from "./otel-setup.js";
3+
export { setupObservability, shutdownObservability } from "./otel-setup.js";
44

55
// For programmatic setup
66
export async function setupN8nObservability(options?: {

src/otel-setup.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,6 @@ export function setupObservability(options: ObservabilityOptions = {}): void {
294294
}
295295
}
296296

297-
/**
298-
* Force flush all pending telemetry (without shutting down)
299-
*/
300-
export async function flushObservability(): Promise<void> {
301-
if (sdkInstance) {
302-
await sdkInstance.forceFlush();
303-
}
304-
}
305-
306297
/**
307298
* Shutdown the OpenTelemetry SDK
308299
*/

src/patch-n8n.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ import {
1313
import { flatten } from "flat";
1414
import type { IExecuteData, INodeExecutionData } from "n8n-workflow";
1515

16-
// Import the flush function
17-
let flushObservability: (() => Promise<void>) | null = null;
18-
try {
19-
const otelSetup = require("./otel-setup.js");
20-
flushObservability = otelSetup.flushObservability;
21-
} catch {
22-
// Flush not available
23-
}
24-
2516
type AnyFunction = (...args: unknown[]) => unknown;
2617

2718
type WorkflowMeta = { id?: string; name?: string };
@@ -444,15 +435,6 @@ function patchWorkflowExecute(core: unknown): boolean {
444435
throw err;
445436
} finally {
446437
span.end();
447-
448-
// Explicitly flush spans after workflow completes (for CLI mode)
449-
if (flushObservability) {
450-
try {
451-
await flushObservability();
452-
} catch {
453-
// Ignore flush errors
454-
}
455-
}
456438
}
457439
}
458440
);

0 commit comments

Comments
 (0)