Align CompactConsoleLogRecordExporter with OTLP backend schema#1358
Open
Miqueasher wants to merge 3 commits intomainfrom
Open
Align CompactConsoleLogRecordExporter with OTLP backend schema#1358Miqueasher wants to merge 3 commits intomainfrom
Miqueasher wants to merge 3 commits intomainfrom
Conversation
wangzlei
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CompactConsoleLogRecordExporterJSON output with CloudWatch OTLPbackend format (field names, types, structure)
customizeLogsExporterto supportOTEL_LOGS_EXPORTER=otlp,console— previously only
console(exact match) was recognizedexporters were enabled simultaneously
exportPath:"console"field to enable independent validation ofconsole vs OTLP export paths
Bug Fixes
SigV4 never enabled with
otlp,console:isSigv4ValidConfig()checkedexporter.equals("otlp")which fails for"otlp,console". Changed to.contains("otlp").OTel agent crash with dual exporters:
customizeLogsExporter()blindlycast every exporter to
OtlpHttpLogRecordExporter. When called withSystemOutLogRecordExporter, it threwClassCastException→IllegalStateException, crashing the entire agent.Added
instanceofcheck before cast.Console exporter not wired in with
otlp,console: Previously checkedlogsExporterConfig.equals("console"). Now checks the exporter's class name(
SystemOutLogRecordExporter) to correctly identify and replace it regardlessof the config string.
Test plan
awsagentprovidertests pass)Terraform, verified console JSON in CloudWatch, verified OTLP logs in
otlp-logsstream, ran validator — PASSEDBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.