-
Notifications
You must be signed in to change notification settings - Fork 126
/
build.gradle.kts
42 lines (34 loc) · 1.29 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
plugins {
id("java")
id("application")
}
description = "OpenTelemetry Log Appender Example"
val moduleName by extra { "io.opentelemetry.examples.log-appender" }
java {
toolchain {
// logback 1.4.x+ requires java 11
languageVersion.set(JavaLanguageVersion.of(11))
}
}
dependencies {
// Slf4J / logback
implementation("org.slf4j:slf4j-api:2.0.16")
implementation("ch.qos.logback:logback-core:1.5.12")
implementation("ch.qos.logback:logback-classic:1.5.12")
// JUL to SLF4J bridge
implementation("org.slf4j:jul-to-slf4j:2.0.16")
// Log4j
implementation(platform("org.apache.logging.log4j:log4j-bom:2.24.1"))
implementation("org.apache.logging.log4j:log4j-api")
implementation("org.apache.logging.log4j:log4j-core")
// OpenTelemetry core
implementation("io.opentelemetry:opentelemetry-sdk")
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
implementation("io.opentelemetry.semconv:opentelemetry-semconv")
// OpenTelemetry log4j / logback appenders
implementation("io.opentelemetry.instrumentation:opentelemetry-log4j-appender-2.17")
implementation("io.opentelemetry.instrumentation:opentelemetry-logback-appender-1.0")
}
application {
mainClass = "io.opentelemetry.example.logappender.Application"
}