MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / logPluginLoadErrors

Function logPluginLoadErrors

src/utils/telemetry/pluginTelemetry.ts:267–289  ·  view source on GitHub ↗
(
  errors: PluginError[],
  managedNames: Set<string> | null,
)

Source from the content-addressed store, hash-verified

265 * enum — use it directly as error_category.
266 */
267export function logPluginLoadErrors(
268 errors: PluginError[],
269 managedNames: Set<string> | null,
270): void {
271 for (const err of errors) {
272 const { name, marketplace } = parsePluginIdentifier(err.source)
273 // Not all PluginError variants carry a plugin name (some have pluginId,
274 // some are marketplace-level). Use the 'plugin' property if present,
275 // fall back to the name parsed from err.source.
276 const pluginName = 'plugin' in err && err.plugin ? err.plugin : name
277 logEvent('tengu_plugin_load_failed', {
278 error_category:
279 err.type as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS,
280 _PROTO_plugin_name:
281 pluginName as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
282 ...(marketplace && {
283 _PROTO_marketplace_name:
284 marketplace as AnalyticsMetadata_I_VERIFIED_THIS_IS_PII_TAGGED,
285 }),
286 ...buildPluginTelemetryFields(pluginName, marketplace, managedNames),
287 })
288 }
289}

Callers 1

logSessionTelemetryFunction · 0.85

Calls 3

parsePluginIdentifierFunction · 0.85
logEventFunction · 0.85

Tested by

no test coverage detected