Skip to content

feat(logs): make application level parsing opt-in - #448

Open
lilienblum wants to merge 3 commits into
mainfrom
lilienblum/alien-546-log-level-parsing
Open

feat(logs): make application level parsing opt-in#448
lilienblum wants to merge 3 commits into
mainfrom
lilienblum/alien-546-log-level-parsing

Conversation

@lilienblum

Copy link
Copy Markdown
Contributor

Summary

  • add deployment-level logs.parseApplicationLevels configuration, disabled by default
  • use recognized top-level JSON levels for OTLP severity in worker and operator capture paths
  • preserve the original log body and retain existing severity fallback behavior
  • expose the setting in generated schemas, Helm, and CloudFormation

Recognized values are TRACE, DEBUG, INFO, WARN/WARNING, ERROR, and FATAL, matched case-insensitively.

Verification

  • alien-core, alien-deployment, alien-operator, alien-worker-runtime, Helm, and CloudFormation tests
  • generated TypeScript schemas and CloudFormation snapshots
  • Helm template and kubeconform validation
  • cfn-lint validation
  • git diff --check

Linear: https://linear.app/alienplatform/issue/ALIEN-546

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

The PR makes application-provided JSON log-level parsing opt-in and propagates the setting through deployment generators and runtime capture boundaries.

  • Adds shared parsing for recognized top-level JSON level values.
  • Preserves raw log bodies and stream-based fallback severity.
  • Exposes the option through stack settings, Helm, and CloudFormation.
  • Threads the setting into worker, daemon, and operator capture paths.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/alien-core/src/application_logs.rs Adds the shared parser and recognized application-level mapping.
crates/alien-core/src/stack_settings.rs Adds the opt-in log setting with disabled-by-default serialization semantics.
crates/alien-deployment/src/helpers.rs Injects or removes the runtime parsing environment variable during deployment reconciliation.
crates/alien-worker-runtime/src/otlp.rs Applies parsed application levels to captured OTLP records while retaining stream fallback.
crates/alien-operator/src/collector_logs.rs Applies the shared severity mapping to operator-collected application logs.
crates/alien-cloudformation/src/generator.rs Adds the deployment parameter and serializes its boolean value into registered stack settings.
crates/alien-helm/src/generator.rs Carries the new stack setting through generated Helm configuration.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Settings[logs.parseApplicationLevels] --> Deploy[Deployment environment injection]
  Settings --> IaC[Helm and CloudFormation output]
  Deploy --> Worker[Worker runtime capture]
  Deploy --> Daemon[Daemon capture]
  Settings --> Operator[Operator collector capture]
  Worker --> Parser[Top-level JSON level parser]
  Daemon --> Parser
  Operator --> Parser
  Parser --> OTLP[OTLP severity fields]
  Fallback[stdout INFO / stderr ERROR] --> OTLP
Loading

Reviews (3): Last reviewed commit: "chore: merge main into alien-546-log-lev..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant