qy-liuhuo opened a new issue, #11065: URL: https://github.com/apache/inlong/issues/11065
### Description parent issue #10798 Since the sort task will be run on different TaskManager nodes, in order to more conveniently view the log output, we can consider using `OpenTelemetry` to achieve centralized log reporting. ### Use case To achieve the above function, we needs to configure an OpenTelemetryAppender for log4j: When submitting tasks in the form of jobGraph, TaskManager uses `log4j2-console.properties` for configuration by default. However, this method will cause the OpenTelemetryAppender in the connector to be inconsistent with the OpenTelemetryAppender instance loaded when Flink is initialized, resulting in the appender not being able to be used normally. For this reason, consider dynamically adding openTelemetryAppender in connect based on log4j-api, developing OpenTelemetryLogger class, and providing `initial`, `install` and `ubinstall` functions for OpenTelemetryAppender. The way to integrate OpenTelemetryAppender for connectors that comply with the [FLIP-27](https://cwiki.apache.org/confluence/display/FLINK/FLIP-27%3A+Refactor+Source+Interface) standard is as follows: 1. Create a new `OpenTelemetryLogger` object in the corresponding SourceReader construction method and configure relevant parameters(log-collector endpoint,logLevel,layout and so on) 2. Call the `install` method of the openTelemetryLogger object in the start method of SourceReader 3. Call the `uninstall` method of the openTelemetryLogger object in the close method of SourceReader ### Are you willing to submit PR? - [X] Yes, I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
