> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idun-group.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Trace Pipeline Health

> Return queue depth + drop count from the running exporter.

Safe-default: when no exporter is attached to ``app.state`` (engine
booted without a trace pipeline, or T7 wiring not present), return
zeroes plus ``writer_running=False`` so the UI panel stays
renderable instead of erroring.

Declared **before** the ``/{otel_trace_id}`` route so the literal
path takes precedence over the path-parameter route at match time
— FastAPI iterates in declaration order.

Also surfaces ``database_dialect`` (read off the sessionmaker bind)
so the UI can conditionally render the SQLite operational banner
without a second round-trip.



## OpenAPI

````yaml /standalone/openapi.json get /admin/api/v1/traces/_health
openapi: 3.1.0
info:
  title: Idun Agent Engine Server
  description: A production-ready server for conversational AI agents
  version: 0.6.1
servers: []
security: []
tags:
  - name: Runtime
    description: >-
      Public agent run endpoints, engine operations, and chat-channel webhooks.
      SSE streaming via the AG-UI protocol.
  - name: Agent Configuration
    description: >-
      Singleton admin endpoints for the agent, prompts, memory, guardrails, and
      onboarding wizard.
  - name: Auth & SSO
    description: >-
      Login, sessions, password change, SSO config, and the public SSO discovery
      endpoint.
  - name: Integrations & Tools
    description: MCP server registry and external integration credentials.
  - name: Observability
    description: Tracing/logging provider configuration.
  - name: Traces
    description: >-
      Trace and span storage admin endpoints — list, detail, delete, and
      pipeline-health for the standalone trace store.
  - name: Dashboard
    description: >-
      Operator dashboard widgets — KPIs, time-series, top errors, and
      configuration summary.
paths:
  /admin/api/v1/traces/_health:
    get:
      tags:
        - Traces
      summary: Trace Pipeline Health
      description: |-
        Return queue depth + drop count from the running exporter.

        Safe-default: when no exporter is attached to ``app.state`` (engine
        booted without a trace pipeline, or T7 wiring not present), return
        zeroes plus ``writer_running=False`` so the UI panel stays
        renderable instead of erroring.

        Declared **before** the ``/{otel_trace_id}`` route so the literal
        path takes precedence over the path-parameter route at match time
        — FastAPI iterates in declaration order.

        Also surfaces ``database_dialect`` (read off the sessionmaker bind)
        so the UI can conditionally render the SQLite operational banner
        without a second round-trip.
      operationId: trace_pipeline_health_admin_api_v1_traces__health_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandaloneTraceHealth'
components:
  schemas:
    StandaloneTraceHealth:
      properties:
        queueDepth:
          type: integer
          title: Queuedepth
        maxQueueSize:
          type: integer
          title: Maxqueuesize
        overflowCount:
          type: integer
          title: Overflowcount
        writerRunning:
          type: boolean
          title: Writerrunning
        databaseDialect:
          type: string
          title: Databasedialect
          default: unknown
        instrumentorStatus:
          type: string
          title: Instrumentorstatus
          default: ok
        instrumentorMessage:
          anyOf:
            - type: string
            - type: 'null'
          title: Instrumentormessage
      type: object
      required:
        - queueDepth
        - maxQueueSize
        - overflowCount
        - writerRunning
      title: StandaloneTraceHealth
      description: |-
        Body of ``GET /admin/api/v1/traces/_health``.

        Reflects the running ``StandaloneSpanExporter``'s queue. When the
        trace pipeline is not attached (engine booted without traces) the
        router returns zeroes + ``writer_running=False`` instead of 404 so
        the UI panel can render a stable "pipeline idle" state.

        ``database_dialect`` lets the UI conditionally render the SQLite
        operational banner without a second round-trip; it mirrors the
        SQLAlchemy bind dialect name (``"sqlite"`` or ``"postgresql"``)
        and falls back to ``"unknown"`` when no bind is reachable.

````