Logging Specification

Structured logging format and categories for the Stella Ops Release Orchestrator.

Audience: Operators and developers who consume Release Orchestrator logs or wire them into a log-aggregation pipeline. Status: Planned — this is the reference logging contract for the module. Source: Stella Ops Orchestrator Architecture advisory, section 13.2. Related: Metrics · Tracing · Alerting · Operations Overview

Overview

The Release Orchestrator emits structured JSON logs with a consistent envelope, correlation IDs, and context propagation across every component. Logs carry W3C trace context (trace_id/span_id) so a single request can be followed across the metrics, logs, and traces signals — see Tracing for the propagation model.


Structured Log Format

JSON Schema

{
  "timestamp": "2026-01-09T14:32:15.123Z",
  "level": "info",
  "module": "promotion-manager",
  "message": "Promotion approved",
  "context": {
    "tenant_id": "uuid",
    "promotion_id": "uuid",
    "release_id": "uuid",
    "environment": "prod",
    "user_id": "uuid"
  },
  "details": {
    "approvals_count": 2,
    "gates_passed": ["security", "approval", "freeze"],
    "decision": "allow"
  },
  "trace_id": "abc123",
  "span_id": "def456",
  "duration_ms": 45
}

Log Levels

LevelUsage
errorErrors requiring attention; failures that impact functionality
warnPotential issues; degraded functionality; approaching limits
infoSignificant events; state changes; audit-relevant actions
debugDetailed debugging info; request/response bodies
traceVery detailed tracing; internal state; performance profiling

Log Categories

CategoryExamples
apiRequest received, response sent, validation errors
promotionPromotion requested, approved, rejected, completed
deploymentDeployment started, task assigned, completed, failed
securityGate evaluation, vulnerability found, policy violation
agentAgent registered, heartbeat, task execution
workflowWorkflow started, step executed, completed
integrationIntegration tested, resource discovered, webhook received

Logging Examples

API Request

{
  "timestamp": "2026-01-09T14:32:15.123Z",
  "level": "info",
  "module": "api",
  "message": "Request received",
  "context": {
    "tenant_id": "uuid",
    "user_id": "uuid"
  },
  "details": {
    "method": "POST",
    "path": "/api/v1/promotions",
    "status": 201,
    "duration_ms": 125
  },
  "trace_id": "abc123",
  "span_id": "def456"
}

Promotion Event

{
  "timestamp": "2026-01-09T14:32:15.123Z",
  "level": "info",
  "module": "promotion-manager",
  "message": "Promotion approved",
  "context": {
    "tenant_id": "uuid",
    "promotion_id": "uuid",
    "release_id": "uuid",
    "environment": "prod",
    "user_id": "uuid"
  },
  "details": {
    "approvals_count": 2,
    "gates_passed": ["security", "approval", "freeze"],
    "decision": "allow"
  },
  "trace_id": "abc123",
  "span_id": "def456",
  "duration_ms": 45
}

Security Gate Failure

{
  "timestamp": "2026-01-09T14:32:15.123Z",
  "level": "warn",
  "module": "security",
  "message": "Security gate blocked promotion",
  "context": {
    "tenant_id": "uuid",
    "promotion_id": "uuid",
    "release_id": "uuid",
    "environment": "prod"
  },
  "details": {
    "gate_name": "security-gate",
    "reason": "Critical vulnerability found",
    "vulnerabilities": {
      "critical": 1,
      "high": 3
    }
  },
  "trace_id": "abc123",
  "span_id": "def456"
}

Sensitive Data Masking

The following fields are automatically masked in logs:

Field TypeMasking Strategy
PasswordsNot logged
API KeysFirst 4 and last 4 chars only
TokensHash only
PIIRedacted
CredentialsNot logged

Example

{
  "message": "Authentication succeeded",
  "details": {
    "api_key": "sk_l...abcd",
    "token_hash": "sha256:abc123..."
  }
}

Correlation IDs

All logs include correlation IDs for request tracing:

FieldDescription
trace_idW3C Trace Context trace ID
span_idCurrent operation span ID
correlation_idBusiness-level correlation (optional)

Log Aggregation

Recommended log aggregation setup:

# Fluent Bit configuration
[INPUT]
    Name   tail
    Path   /var/log/stella/*.log
    Parser json

[FILTER]
    Name   nest
    Match  *
    Operation lift
    Nested_under context

[OUTPUT]
    Name   opensearch
    Match  *
    Host   opensearch.example.com
    Index  stella-logs

See Also