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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]