Skip to content

Commit 54435af

Browse files
committed
fix(controller): make langfuse-tracer always-allow to avoid gateway restart
langfuse-tracer was conditionally added to plugins.allow based on analyticsEnabled. On first boot or when the preference changed, this mutated plugins.allow, which OpenClaw treats as a full gateway restart (~11s drain + process restart on Windows). Move langfuse-tracer to the unconditional always-allow list and use the entries.enabled flag to toggle it. This way analytics preference changes only flip the enabled flag (hot-reload path) instead of mutating plugins.allow (full restart path).
1 parent 620f486 commit 54435af

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

apps/controller/src/lib/openclaw-config-compiler.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,10 @@ function compilePlugins(
289289
"nexu-runtime-model",
290290
"nexu-credit-guard",
291291
"nexu-platform-bootstrap",
292-
...(analyticsEnabled ? ["langfuse-tracer"] : []),
292+
// Always allow langfuse-tracer so analytics preference changes only
293+
// toggle its `enabled` flag (hot-reload) instead of mutating
294+
// plugins.allow which triggers a full gateway restart (~11s).
295+
"langfuse-tracer",
293296
...(resolvedMiniMaxOauth ? ["minimax-portal-auth"] : []),
294297
];
295298

@@ -341,13 +344,9 @@ function compilePlugins(
341344
"nexu-runtime-model": {
342345
enabled: true,
343346
},
344-
...(analyticsEnabled
345-
? {
346-
"langfuse-tracer": {
347-
enabled: true,
348-
},
349-
}
350-
: {}),
347+
"langfuse-tracer": {
348+
enabled: analyticsEnabled,
349+
},
351350
"nexu-credit-guard": {
352351
enabled: true,
353352
config: {

0 commit comments

Comments
 (0)