numinnex opened a new issue, #4722:
URL: https://github.com/apache/iggy/issues/4722
### Bug description
Records that plugin dependencies emit through the `log` crate never reach
the runtime log.
`sink_connector!` and `source_connector!`
(`core/connectors/sdk/src/{sink,source}.rs`) set up the plugin subscriber with
`Registry::default().with(CallbackLayer).with(EnvFilter).try_init()`. The
workspace `tracing-subscriber` is built with `fmt`, `env-filter` and `ansi`
only, without `tracing-log`, so `try_init` installs no `LogTracer`. Each plugin
is its own cdylib with its own `log` logger, and that logger stays unset, so
every `log::` record is dropped.
Example: OpenDAL's `RetryLayer` reports retries with `log::warn!` (target
`opendal::layers::retry`). When S3 requests fail, the Iceberg sink retries
after 1 s, 2 s and 4 s, and none of those warnings appear. An external test hit
exactly this: throughput collapsed to tens of rows/s with no trace in the sink
log.
### Affected area / component
Connectors: SDK, every plugin with a dependency that logs through `log`
### Versions
master @ 3c265dd89
### Proposed fix
Call `tracing_log::LogTracer::init()` in the SDK's plugin init next to the
subscriber setup.
Enabling the `tracing-log` feature on the workspace `tracing-subscriber`
would also work. But that dependency is shared with the server, and Cargo
merges features across crates built together, so the server's logging setup
would change as well.
--
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]