AlinsRan opened a new pull request, #13444: URL: https://github.com/apache/apisix/pull/13444
## Summary Add the `toolset` plugin — a diagnostics and observability framework that hosts multiple lightweight sub-plugins. Each sub-plugin is configured via `plugin_attr.toolset` in `config.yaml` and is dynamically loaded/unloaded at runtime without restarting APISIX. ## Sub-plugins ### `trace` Instruments APISIX request phases and emits a formatted timing table to the error log for sampled requests. Features: - Configurable sampling rate (N out of 100 requests) - Host and path allowlist filtering (glob patterns) - Trace header detection (`x-request-id`, `traceparent`, `sw8`, `x-b3-traceid`) - Optional UUID generation when no trace header is present - Minimum timespan threshold to filter out fast requests - Additional nginx/APISIX variable capture ### `table_count` Periodically measures and logs the item count of specified Lua module tables, useful for monitoring memory growth or detecting table leaks. Features: - Configurable list of Lua modules to measure - Configurable measurement interval and recursion depth - Scoped to specific APISIX process types (worker, privileged agent) ## Changes - `apisix/plugins/toolset/init.lua` — plugin entry point with dynamic sub-plugin load/unload via timer - `apisix/plugins/toolset/config.lua` — default sub-plugin configuration (loaded at runtime, not via schema) - `apisix/plugins/toolset/src/trace.lua` — trace sub-plugin - `apisix/plugins/toolset/src/table-count/init.lua` — table-count sub-plugin - `apisix/cli/config.lua` — default plugin_attr for toolset - `conf/config.yaml.example` — plugin list entry and documented plugin_attr example - `docs/en/latest/plugins/toolset.md` — plugin documentation - `docs/en/latest/config.json` — sidebar navigation entry -- 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]
