Skip to content

fix(telemetry): optimize jaeger memory, exception span hygiene, and embedding failover #104

Closed

Description

@dan-petty

Summary

Following comprehensive trace analysis in Jaeger UI (URL: http://localhost:16687/search?end=1789071956083000&limit=1000&lookback=24h&maxDuration&minDuration&service=devops-cli&start=1788985556083000), four core optimizations and fixes were identified:

  1. Jaeger Pod OOMKilled on Large Trace Queries (Infrastructure Defect):
    • MEMORY_MAX_TRACES was set to 50,000 with a 512Mi limit, causing OOMKilled (Exit 137). Reduce traces to 10,000 and increase limits to 1024Mi.
  2. False Exception Events in Telemetry for Intentional CLI Exits:
    • In tracer.py, CLI exits with non-zero exit codes (e.g. typer.Exit) were recorded as full traceback exceptions, inflating trace payloads and polluting Jaeger error filters.
  3. RAG Embedding ReadTimeout Stall (120s):
    • In embeddings.py, embedding queries defaulted to a 120s timeout before failover. Bounding embedding timeout to 15.0s ensures rapid failover across candidate nodes.
  4. Port-Forward Daemon Telemetry Pipeline:
    • Ensure OTLP HTTP ingestion port 4318 is forwarded alongside query UI port 16686.

Acceptance Criteria

  • Update k8s/otel/jaeger.yaml with MEMORY_MAX_TRACES: 10000 and 1024Mi memory limit, applied to cluster.
  • Refactor tracer.py to avoid recording stack trace exceptions on handled/intentional CLI exits.
  • Configure bounded embedding timeout and fast failover in embeddings.py.
  • Verify test suite and comprehensive quality gates pass.

Activity

  1. added this to the v0.2.15 milestone on Sep 10, 2026
  2. added
    type/bug
    scope/telemetry
    priority/p1-high
    status/in-progress
    on Sep 10, 2026
  3. added a commit that references this issue on Sep 10, 2026
    98cbe12
  4. dan-petty commented on Sep 10, 2026

    @dan-petty
    OwnerAuthor

    Delivered and verified in commit 98cbe12 on release/v0.2.15:

    • Jaeger Memory & Retention: MEMORY_MAX_TRACES reduced to 10,000 and container memory limits raised to 1024Mi in k8s/otel/jaeger.yaml to eliminate cgroup OOMKills. Applied to cluster.
    • Exception Span Hygiene: Refactored src/devops_cli/telemetry/tracer.py so handled CLI exits (typer.Exit) do not record stack traces or create error traceback events.
    • RAG Embedding Timeout & Fast Failover: Defined DEFAULT_RAG_EMBEDDING_TIMEOUT: 15.0 and bounded connect timeout (2.0s) in src/devops_cli/ai/rag/embeddings.py to prevent multi-minute stalls when Ollama nodes are unreachable.
    • Verification: 24/24 telemetry unit tests, 20/20 embedding unit tests, and all 10/10 devops ci quality gates passed cleanly.
  5. added a commit that references this issue on Sep 10, 2026
    d9c1e63
  6. removed
    status/in-progress
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/telemetrytype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions