[Migration #121.3] Implement OpenTelemetry tracing for LLM operations #310

Closed
opened 2026-02-04 02:35:56 +00:00 by jason.woltje · 0 comments
Owner

Parent EPIC: #121 - Backend Migration from Jarvis r1
Phase: 1 - LLM Abstraction Layer
Estimate: 2 days
Dependencies: Requires #121.4 (OpenTelemetry core) to be completed first

Description

Migrate OpenTelemetry instrumentation for LLM calls following GenAI semantic conventions.

Source Files

  • jarvis/core/llm_tracing.py

Target Implementation

  • Create apps/api/src/llm/tracing/ module
  • Implement traced LLM wrappers
  • Add GenAI semantic convention attributes
  • Support for streaming and non-streaming modes
  • Token usage tracking in spans

Acceptance Criteria

  • LLM tracing module implemented
  • GenAI semantic conventions followed
  • Token usage captured in spans
  • Streaming support
  • Unit tests (85% coverage)
**Parent EPIC:** #121 - Backend Migration from Jarvis r1 **Phase:** 1 - LLM Abstraction Layer **Estimate:** 2 days **Dependencies:** Requires #121.4 (OpenTelemetry core) to be completed first ## Description Migrate OpenTelemetry instrumentation for LLM calls following GenAI semantic conventions. ## Source Files - `jarvis/core/llm_tracing.py` ## Target Implementation - Create `apps/api/src/llm/tracing/` module - Implement traced LLM wrappers - Add GenAI semantic convention attributes - Support for streaming and non-streaming modes - Token usage tracking in spans ## Acceptance Criteria - [ ] LLM tracing module implemented - [ ] GenAI semantic conventions followed - [ ] Token usage captured in spans - [ ] Streaming support - [ ] Unit tests (85% coverage)
jason.woltje added this to the M4-LLM (0.0.4) milestone 2026-02-04 02:35:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#310