有完整需求文档,开发量大概 2 周时间,预算充足
需求框架如下
1. Project Overview
High-level Requirements
OpenTelemetry instrumentation packages that capture telemetry from LLM provider SDKs. These packages should support:
-
Auto-Instrumentation:
- Hook into LLM client libraries with zero code changes for end users
- Capture tokens, latency, cost, and optionally request/response content
- Export data via standard OTLP protocol to our-company's backend
- Follow OpenTelemetry Gen AI Semantic Conventions
-
Manual Instrumentation:
- Provide tracer API for custom spans (agent workflows, tools, business logic)
- Support
@tracedecorator for easy function tracing - Allow nesting of custom spans with auto-instrumented LLM calls
2. Scope of Work
In Scope
| Task ID | Component | Description | Est. Days |
|---|---|---|---|
| OTEL-001 | OpenAI | Chat, completions, embeddings, streaming with TTFT (sync + async) | |
| OTEL-002 | Anthropic | Messages API, streaming with TTFT (sync + async) | |
| OTEL-003 | Gemini | Content generation, embeddings, streaming with TTFT (sync + async) | |
| OTEL-004 | Content Capture | Optional request/response content capture with sanitization | |
| OTEL-005 | Wrapper Package | our-company-llm package with one-line setup |
|
| OTEL-006 | Multi-Modal | Image/audio/video metadata capture for vision and media APIs | |
| OTEL-007 | Manual Instrumentation | Tracer API, @trace decorator for custom spans | |
| Total |
Out of Scope
- Backend/collector infrastructure (our-company handles this)
- Dashboard/UI development
- TypeScript/Node.js instrumentations - future phase
欢迎 Email 或 留 VX
