7.3 OPEA Services OTel Tracing (Dataprep + Reranker)
Sprint Key: 7-3-opea-services-otel-tracing-dataprep-reranker
Epic: 7
PRD: testing-framework
Story 7.3: OPEA Services OTel Tracing (Dataprep + Reranker)
Status: ready-for-dev
Story
As a developer, I want the Dataprep and Reranker FastAPI services instrumented with OpenTelemetry, so that document ingestion and result reranking are visible in distributed traces.
Acceptance Criteria
- AC1: OTel SDK dependencies installed in Dataprep and Reranker Dockerfiles
-
AC2: Dataprep service instrumented with
service.name = "genieai-dataprep" -
AC3: Reranker service instrumented with
service.name = "genieai-reranker" -
AC4: Dataprep-specific span attributes:
dataprep.file_type,dataprep.chunk_count,dataprep.file_size_bytes -
AC5: Reranker-specific span attributes:
reranker.top_k,reranker.score_threshold,reranker.model_id,reranker.strategy - AC6: Trace context propagation on inter-service calls
-
AC7: Configurable OTLP endpoint via
OTEL_EXPORTER_OTLP_ENDPOINT - AC8: Bootstrap-safe (graceful degradation if collector unavailable)
- AC9: PII protection (no file content or document text in spans)
- AC10: No API contract changes
- AC11: Ruff passes on all modified code
- AC12: Docker builds succeed
- AC13: Existing tests pass