🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
feat(worker): emit per-project blob export lag gauge (LFE-10521) (#14559)
Niklas Semmler2b67f0b3c3ab
diff --git a/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts b/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.tsindex 1267b8109d..a6f8f4fffb 100644--- a/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts+++ b/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts@@ -1086,6 +1086,18 @@ export const handleBlobStorageIntegrationProjectJob = async (`[BLOB INTEGRATION] Calculated maxTimestamp for project ${projectId}: ${maxTimestamp}, isValid: ${!isNaN(maxTimestamp.getTime())}, getTime: ${maxTimestamp.getTime()}, frequencyIntervalMs: ${frequencyIntervalMs}`,);+ // How far behind real-time this project's export frontier is. maxTimestamp is+ // the end of the window this job advances to, so lag ≈ the export buffer when+ // caught up and grows during historic catch-up. Per-job emit, so it goes stale+ // if the exporter stops entirely for a project (see LFE-10521).+ if (!isNaN(maxTimestamp.getTime())) {+ recordGauge(+ "langfuse.blobstorage.export_delay_seconds",+ (now.getTime() - maxTimestamp.getTime()) / 1000,+ { projectId },+ );+ }+// Skip export if the time window is empty or invalidif (minTimestamp >= maxTimestamp) {logger.info(