corda/opentelemetry-driver/build.gradle
Adel El-Beik 7a133f687c
ENT-6893: First cut of telemetry integration. (#7247)
First cut of telemetry integration.

Open telemetry can be enabled in two ways, first is via an opentelemetry java agent specified on the command line. With this way you get the advantage of spans created from other libraries, like hibernate. The java agent does byte code rewriting to insert spans.
The second way is with the open telemetry driver (that links with the opentelemetry sdk). This is a fat jar provided with this project and needs to go into the node drivers directory.
2022-10-28 14:41:39 +01:00

49 lines
1.3 KiB
Groovy

import static org.gradle.api.JavaVersion.VERSION_1_8
plugins {
// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id 'org.jetbrains.kotlin.jvm' // version '1.6.21'
// Apply the java-library plugin for API and implementation separation.
id 'java-library'
id 'com.github.johnrengelman.shadow' // version '7.1.2'
id 'net.corda.plugins.publish-utils'
}
description 'OpenTelemetry Driver'
// This driver is required by core, so must always be 1.8. See core build.gradle.
targetCompatibility = VERSION_1_8
dependencies {
// Use the Kotlin JDK 8 standard library.
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:4.9.1'
implementation "io.opentelemetry:opentelemetry-api:$open_telemetry_version"
implementation platform("io.opentelemetry:opentelemetry-bom:$open_telemetry_version")
implementation "io.opentelemetry:opentelemetry-sdk"
implementation 'io.opentelemetry:opentelemetry-exporter-otlp'
implementation "io.opentelemetry:opentelemetry-semconv:$open_telemetry_sem_conv_version"
}
shadowJar {
archiveClassifier = jdkClassifier
relocate 'kotlin', 'privatekotlin'
exclude "**/Log4j2Plugins.dat"
zip64 true
}
artifacts {
archives shadowJar
publish shadowJar
}
jar {
enabled = false
}
publish {
disableDefaultJar = true
name 'corda-opentelemetry-driver'
}