You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wu-sheng (via GitHub)" <gi...@apache.org> on 2026/03/07 16:21:44 UTC

[PR] LAL: replace slowSql/sampledTrace sub-DSLs with unified outputType mechanism [skywalking]

wu-sheng opened a new pull request, #13733:
URL: https://github.com/apache/skywalking/pull/13733

   ### Replace hardcoded LAL sub-DSLs with configurable outputType mechanism
   
   Remove `slowSql {}` and `sampledTrace {}` blocks from the LAL grammar and replace them with a unified, extensible `outputType` configuration:
   
   - **`LALOutputBuilder` SPI interface** — implementations register a short name via `name()` (e.g., `SlowSQL`, `SampledTrace`), discovered via `ServiceLoader`
   - **Per-rule YAML config** — `outputType: SlowSQL` instead of wrapping fields in `slowSql {}` blocks
   - **Output fields as extractor assignments** — `statement parsed.statement as String` instead of `slowSql { statement ... }`
   - **Compile-time validation** — output field setters are validated against the builder class at boot
   - **Explicit `sink {}` required** — no sink = no persistence (v1 dispatched inside extractor as side-effect)
   - **Two output paths in `RecordSinkListener`** — `AbstractLog` subclasses (log path) vs `LALOutputBuilder` implementations (builder path)
   
   **Breaking change** for users with custom LAL scripts using `slowSql {}` or `sampledTrace {}` — must migrate to the new `outputType` + output field syntax. See [LAL documentation](https://github.com/apache/skywalking/blob/feature/lal-unified-output-type/docs/en/concepts-and-designs/lal.md#output-type).
   
   All bundled LAL scripts (`mysql-slowsql.yaml`, `pgsql-slowsql.yaml`, `redis-slowsql.yaml`, `envoy-als.yaml`, `k8s-service.yaml`, `mesh-dp.yaml`) and E2E overrides have been updated.
   
   - [ ] If this is non-trivial feature, paste the links/URLs to the design doc.
   - [x] Update the documentation to include this new feature.
   - [x] Tests(including UT, IT, E2E) are added to verify the new feature.
   - [ ] If it's UI related, attach the screenshots below.
   
   - [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
   - [x] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/docs/en/changes/changes.md).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] LAL: replace slowSql/sampledTrace sub-DSLs with unified outputType mechanism [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #13733:
URL: https://github.com/apache/skywalking/pull/13733#issuecomment-4016848987

   @kezhenxu94 I provided a better extension for LAL about multiple and flexible input and output data for logs.
   Meanwhile, the old extractor has several implicit persistent logic, e.g. slowSQL, sampledTrace. They are now unified.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] LAL: replace slowSql/sampledTrace sub-DSLs with unified outputType mechanism [skywalking]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng merged PR #13733:
URL: https://github.com/apache/skywalking/pull/13733


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org