@inso_web/els-mcp
Version:
MCP-сервер поверх INSO Error Logs Service. Read-only tools (search, analytics, fingerprinting, correlations) для подключения Claude Desktop/Code и ChatGPT к логам ошибок. Streamable HTTP transport + stdio для npx-запуска.
28 lines • 1.07 kB
TypeScript
import type { Logger } from 'pino';
/**
* OpenTelemetry SDK setup (опциональный).
*
* Включается через `OTEL_EXPORTER_OTLP_ENDPOINT`. Если переменная не задана —
* tracing полностью disabled, no-op, нет оверхеда.
*
* Auto-instrumentation:
* - HTTP / undici (upstream ELS calls)
* - Express (HTTP transport)
* - ioredis (cache GET / SETEX)
*
* Custom spans:
* - `mcp.tool.{name}` — оборачивает каждый tool handler.
*
* Lazy import: `@opentelemetry/sdk-node` — тяжёлая зависимость (~30MB), грузим
* только если endpoint задан. Это снижает cold-start время stdio-режима.
*/
export interface TracingHandle {
/** Завершить SDK (call before process exit). */
shutdown: () => Promise<void>;
/** Запущен ли SDK. */
enabled: boolean;
}
export declare function setupTracing(opts?: {
log?: Logger;
}): Promise<TracingHandle>;
//# sourceMappingURL=tracing.d.ts.map