Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][Sort] Provides a method to add openTelemetryAppender for the sort connector #11065

Closed
2 tasks done
qy-liuhuo opened this issue Sep 9, 2024 · 0 comments · Fixed by #11066
Closed
2 tasks done
Assignees
Milestone

Comments

@qy-liuhuo
Copy link
Contributor

qy-liuhuo commented Sep 9, 2024

Description

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 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?

  • Yes, I am willing to submit a PR!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants