qy-liuhuo commented on PR #11066:
URL: https://github.com/apache/inlong/pull/11066#issuecomment-2338207539
Just use it like this:
```java
import org.apache.inlong.sort.base.util.OpenTelemetryLogger;
public class XXXSourceReader<T>
{
private static final Logger LOG =
LoggerFactory.getLogger(MySqlSourceReader.class);
private final OpenTelemetryLogger openTelemetryLogger;
public XXXSourceReader() {
...
this.openTelemetryLogger = new OpenTelemetryLogger(); // initialize
OpenTelemetryLogger
}
@Override
public void start() {
openTelemetryLogger.install(); // install OpenTelemetryLogger
...
}
@Override
public void close() throws Exception {
openTelemetryLogger.uninstall(); // uninstall OpenTelemetryLogger
super.close();
}
...
}
```
And you can configure the opentelemetryAppender by providing some parameters:
```java
OpenTelemetryLogger(String serviceName, String endpoint, Layout<?> layout,
Level logLevel)
```
--
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]