LAL: generalize extraLog type, add EnvoyAccessLogBuilder, and DSL class generator test#13736
Merged
LAL: generalize extraLog type, add EnvoyAccessLogBuilder, and DSL class generator test#13736
Conversation
…e tag validation, and DSL class generator test
Keep LogData as a separate parameter so builders can populate service/instance/layer fallback fields. The extraLog is now Optional<Object> for null-safety and type-agnostic input. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The doAnalysis() signature now takes Optional<Object> for extraLog. LogHandler was still passing raw null, causing NPE in the LAL pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
wankai123
approved these changes
Mar 10, 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.
Follow-up improvements to LAL v2 outputType mechanism (#13733)
These changes fix several issues discovered after the initial outputType PR and add a DSL class generator test for offline validation.
Key changes:
Generalize
extraLogfromMessagetoObject—ILogAnalyzerService.doAnalysis()and the entire listener chain now useOptional<Object>instead ofcom.google.protobuf.Message. This removes the protobuf coupling and allows non-protobuf input types in the future.LALOutputBuilder.init()acceptsObjectinstead ofLogData— Each builder casts to its expected input type internally (e.g.,LogDatafor standard logs,HTTPAccessLogEntryfor envoy). This enables the envoy access log builder to receive the raw protobuf entry directly.Add
EnvoyAccessLogBuilder— A newLALOutputBuilderimplementation for envoy access logs that extendsLogBuilderand serializes the raw access log entry as JSON content. Registered via SPI and declared as the default output type for the MESH layer inEnvoyHTTPLALSourceTypeProvider.Move
addTagoffLALOutputBuilderinterface —addTag()was a default no-op on the interface, silently dropping tags for non-Log output types. Now it only exists onLogBuilder, and the LAL compiler validates at compile time thattagassignments are only used with LogBuilder-compatible output types.Remove dead
LogSinkListenerFactorymethods —addSinkListenerFactory()andgetSinkListenerFactory()onILogAnalysisListenerManagerwere unused after the v2 refactoring.Remove unused
ModuleManager/ModuleConfigfromLogAnalyzer— Constructor now only takesILogAnalysisListenerManager.Add
DSLClassGeneratorTest— A test inserver-starterthat compiles all OAL, MAL, LAL, and Hierarchy scripts and dumps.classfiles totarget/generated-dsl-classes/for offline inspection. Documents the tool in the debugging guide.CHANGESlog.