Java
This is a method of installing into an existing application using the SDK provided by Opentelemetry.
1. Log Appender Setting
1) logback
1-1) dependency addition
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-logback-appender-1.0</artifactId>
<version>2.0.0-alpha</version>
<scope>runtime</scope>
</dependency>runtimeOnly group: 'io.opentelemetry.instrumentation', name: 'opentelemetry-logback-appender-1.0', version: '2.0.0-alpha'1-2) logback.xml setting
...
<appender name="OpenTelemetry"
class="io.opentelemetry.instrumentation.logback.appender.v1_0.OpenTelemetryAppender">
</appender>
...
<logger name="OTLP" additivity="false">
<appender-ref ref="OpenTelemetry"/>
<level value="INFO"/>
</logger>2) log4J
2-1) dependency addition
2-2) log4j.xml setting
3) Logger setting
2. Image creation via SDK
1) Build/Pipeline - Build details of the Java application for which you want to collect logs from the build.
2) Click “Image Build Task” to edit

3) Setting environment variables and downloading SDK of Opentelemetry-java-instrumentation

3. Container Setting
1) Logging - Copy the token of the application created in Application Management

2) In Container Details - Settings - Environment Variables tab, set environment variables as follows


4. Check Application Log Check
1) Logging - Application Log - Search for the application you set in the application list.

Last updated