Skip to main content

Observability Overview

This guide covers the observability stack for AI/Run CodeMie — the tools and configuration options that give administrators visibility into platform health, application logs, and AI model usage.

Observability Stack​

AI/Run CodeMie uses two complementary observability layers:

LayerToolsPurpose
Infrastructure logsFluent Bit, Elasticsearch, KibanaCollect, store, and visualize application and service logs
AI traces & metricsLangfuseTrack LLM requests, latency, costs, and conversation metrics

Infrastructure Logging​

Log Collection — Fluent Bit​

Fluent Bit runs as a DaemonSet on every cluster node and forwards container logs to Elasticsearch. It is deployed as part of the observability components during platform installation.

Log Storage — Elasticsearch​

Application logs and conversation metrics are stored in Elasticsearch. Application and conversation indexes are controlled by environment variables in your CodeMie API deployment:

VariableDefaultDescription
ELASTIC_LOGS_INDEXlogs-codemie-infra*Index for application and API logs
CONVERSATIONS_METRICS_INDEXcodemie-conversationsIndex for conversation-level metrics

Quarterly User Metrics Indexes​

When metrics index rotation is enabled, user and usage metrics are written through the codemie_metrics_logs_write alias. The alias points to one quarterly index at a time:

codemie_metrics_logs-YYYY-qN

For example, codemie_metrics_logs-2026-q3 stores metrics for the third quarter of 2026. Analytics queries use codemie_metrics_logs*, which includes the legacy codemie_metrics_logs index and all quarterly indexes.

Rotation is disabled by default. To enable it, bootstrap the write alias, configure Fluent Bit to use the alias, and set METRICS_ROTATION_ENABLED=true. See Metrics Index Rotation for the complete configuration procedure and Metrics Index Rotation Update for migrating an existing deployment.

Log Visualization — Kibana​

Kibana provides a pre-configured dashboard for browsing CodeMie logs and conversation metrics. Access it at the Kibana URL exposed by your deployment.

Log Level​

Control the verbosity of application logs via the LOG_LEVEL environment variable in your CodeMie API configuration:

ValueDescription
DEBUGMaximum verbosity — includes request/response details
INFOStandard operational events (default)
WARNINGWarnings and errors only
ERRORErrors only

AI Traces & Metrics — Langfuse​

Prerequisite: Assistants Evaluation extension

Langfuse is deployed as part of the optional Assistants Evaluation extension. You must deploy this extension before configuring Langfuse environment variables or enabling trace collection.

Langfuse captures detailed traces for every LLM call made through the platform. This enables per-request inspection of prompts, completions, latency, and token usage.

Configuration​

Langfuse integration is configured via environment variables in the CodeMie API deployment:

VariableDescription
LANGFUSE_TRACESEnable or disable trace collection (true / false)
LANGFUSE_PUBLIC_KEYLangfuse project public key
LANGFUSE_SECRET_KEYLangfuse project secret key
LANGFUSE_HOSTURL of your Langfuse instance
LANGFUSE_BLOCKED_INSTRUMENTATION_SCOPESComma-separated list of scopes to exclude from tracing

What Langfuse Tracks​

  • LLM request and response content
  • Token usage and estimated cost per request
  • Latency by model and endpoint
  • Conversation-level aggregations