Skip to content

Align CompactConsoleLogRecordExporter with OTLP backend schema#1358

Open
Miqueasher wants to merge 3 commits intomainfrom
log_standardization
Open

Align CompactConsoleLogRecordExporter with OTLP backend schema#1358
Miqueasher wants to merge 3 commits intomainfrom
log_standardization

Conversation

@Miqueasher
Copy link
Copy Markdown
Contributor

Summary

  • Align CompactConsoleLogRecordExporter JSON output with CloudWatch OTLP
    backend format (field names, types, structure)
  • Fix customizeLogsExporter to support OTEL_LOGS_EXPORTER=otlp,console
    — previously only console (exact match) was recognized
  • Fix SigV4 config validation to accept comma-separated exporter lists
  • Fix unsafe cast that crashed the OTel agent when both OTLP and console
    exporters were enabled simultaneously
  • Add exportPath:"console" field to enable independent validation of
    console vs OTLP export paths

Bug Fixes

  1. SigV4 never enabled with otlp,console: isSigv4ValidConfig() checked
    exporter.equals("otlp") which fails for "otlp,console". Changed to
    .contains("otlp").

  2. OTel agent crash with dual exporters: customizeLogsExporter() blindly
    cast every exporter to OtlpHttpLogRecordExporter. When called with
    SystemOutLogRecordExporter , it threw
    ClassCastExceptionIllegalStateException, crashing the entire agent.
    Added instanceof check before cast.

  3. Console exporter not wired in with otlp,console: Previously checked
    logsExporterConfig.equals("console"). Now checks the exporter's class name
    (SystemOutLogRecordExporter) to correctly identify and replace it regardless
    of the config string.

Test plan

  • Unit tests updated and passing (all awsagentprovider tests pass)
  • E2E validated locally: built layer from source, deployed Lambda via
    Terraform, verified console JSON in CloudWatch, verified OTLP logs in
    otlp-logs stream, ran validator — PASSED
  • Depends on test framework PR being merged first for CI validation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Miqueasher Miqueasher requested a review from a team as a code owner April 15, 2026 16:55
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.

2 participants