refactor(telemetry): drop plugin_loaded capture from plugin entry

This commit is contained in:
YeonGyu-Kim
2026-05-02 00:10:59 +09:00
parent 14568db278
commit b8a5f27dee
4 changed files with 1 additions and 181 deletions
-22
View File
@@ -18,7 +18,6 @@ import { installAgentSortShim } from "./shared/agent-sort-shim"
import { detectExternalSkillPlugin, getSkillPluginConflictWarning } from "./shared/external-plugin-detector"
import { startBackgroundCheck as startTmuxCheck } from "./tools/interactive-bash"
import { createPluginPostHog, getPostHogDistinctId } from "./shared/posthog"
import { getPluginLoadedCaptureState } from "./shared/posthog-activity-state"
const serverPlugin: Plugin = async (input, _options): Promise<Hooks> => {
installAgentSortShim()
@@ -44,27 +43,6 @@ const serverPlugin: Plugin = async (input, _options): Promise<Hooks> => {
} catch {
// telemetry failure is non-fatal, silently ignore
}
let pluginLoadedCaptureState: ReturnType<typeof getPluginLoadedCaptureState> | null = null
try {
pluginLoadedCaptureState = getPluginLoadedCaptureState()
} catch {
// telemetry failure is non-fatal, silently ignore
}
if (pluginLoadedCaptureState?.capturePluginLoaded) {
try {
posthog.capture({
distinctId,
event: "plugin_loaded",
properties: {
entry_point: "plugin",
has_openclaw: !!pluginConfig.openclaw,
tmux_enabled: isTmuxIntegrationEnabled(pluginConfig),
},
})
} catch {
// telemetry failure is non-fatal, silently ignore
}
}
if (pluginConfig.openclaw) {
await initializeOpenClaw(pluginConfig.openclaw)
}