Capture LLM Observability to Open Telemetry compatible tools. #1
@@ -21,7 +21,6 @@
|
||||
"test:coverage": "jest --coverage",
|
||||
"lint": "eslint src --ext .ts --config eslint.config.mjs",
|
||||
"format": "prettier --write 'src/**/*.ts' 'scripts/**/*.js'",
|
||||
"cli": "npm run build && node dist/index.js",
|
||||
"mcp:stdio": "TRANSPORT_MODE=stdio npm run build && node dist/index.js",
|
||||
"mcp:http": "TRANSPORT_MODE=http npm run build && node dist/index.js",
|
||||
"mcp:inspect": "TRANSPORT_MODE=http npm run build && (node dist/index.js &) && sleep 2 && npx @modelcontextprotocol/inspector http://localhost:3000/mcp",
|
||||
|
||||
@@ -7,7 +7,15 @@ export const CommonConfigSchema = z.object({
|
||||
serviceName: z.string().default('llm-observability-mcp'),
|
||||
serviceVersion: z.string().default('1.0.0'),
|
||||
environment: z.string().default('development'),
|
||||
debug: z.boolean().default(false),
|
||||
debug: z
|
||||
.preprocess((val) => {
|
||||
if (typeof val === 'string') {
|
||||
if (val.toLowerCase() === 'false') return false;
|
||||
if (val.toLowerCase() === 'true') return true;
|
||||
}
|
||||
return val;
|
||||
}, z.boolean())
|
||||
.default(false),
|
||||
logLevel: z.enum(['debug', 'info', 'warn', 'error']).default('info'),
|
||||
});
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
import { Logger } from './utils/logger.util.js';
|
||||
import configLoader from './config/config-loader.js';
|
||||
import { stdioTransport } from './server/stdio.js';
|
||||
import { streamableHttpTransport } from './server/streamableHttp.js';
|
||||
|
||||
@@ -42,9 +41,6 @@ export async function startServer(): Promise<void> {
|
||||
* Main entry point
|
||||
*/
|
||||
async function main() {
|
||||
// Load configuration
|
||||
configLoader.load();
|
||||
|
||||
// Server mode - determine transport and start server
|
||||
await startServer();
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ export class OpenTelemetryService {
|
||||
[ATTR_SERVICE_NAME]: this.config.serviceName,
|
||||
[ATTR_SERVICE_VERSION]: this.config.serviceVersion,
|
||||
[SEMRESATTRS_DEPLOYMENT_ENVIRONMENT]: this.config.environment,
|
||||
debug: this.config.debug,
|
||||
logLevel: this.config.logLevel,
|
||||
});
|
||||
|
||||
// Configure metric exporter
|
||||
|
||||
Reference in New Issue
Block a user