Commit f25aa02
feat(mcp-transport): add Effect.fn + OTEL instrumentation
Convert MCP transport from plain async/await to Effect services with
automatic OTEL span creation. Extract duplicated callApi logic (~200
lines) from both entry points into shared api-fetch.ts module.
New services: MCPTracingService, MCPLoggerService, MCPCacheService,
MCPApiService (with Effect.withSpan), otel-init (NodeSDK), layers.
Each tool handler gets an Effect.fn export (searchPatternsEffect, etc.)
alongside the existing async wrapper for backward compatibility.
All 231 existing tests pass unchanged; 11 new service tests added.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent dac0026 commit f25aa02
19 files changed
Lines changed: 1194 additions & 599 deletions
File tree
- packages/mcp-transport
- src
- services
- __tests__
- tools
- handlers
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
37 | 46 | | |
38 | 47 | | |
39 | 48 | | |
| |||
0 commit comments