Skip to content

Commit

Permalink
Remove separate exporter configuration which we always have in distro… (
Browse files Browse the repository at this point in the history
open-telemetry#5331)

* Remove separate exporter configuration which we always have in distro now.

* Actually remove
  • Loading branch information
anuraaga authored and RashmiRam committed May 23, 2022
1 parent 8713364 commit 8d6d4fb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 40 deletions.
22 changes: 0 additions & 22 deletions javaagent-exporters/build.gradle.kts

This file was deleted.

16 changes: 15 additions & 1 deletion javaagent-tooling/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,22 @@ dependencies {
implementation("io.opentelemetry:opentelemetry-sdk-extension-resources")
implementation("io.opentelemetry:opentelemetry-extension-noop-api")

// Other exporters are in javaagent-exporters
// Exporters with dependencies
implementation("io.opentelemetry:opentelemetry-exporter-jaeger")
implementation("io.opentelemetry:opentelemetry-exporter-logging")
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
implementation("io.opentelemetry:opentelemetry-exporter-otlp-metrics")
implementation("io.opentelemetry:opentelemetry-exporter-otlp-logs")
implementation("io.opentelemetry:opentelemetry-exporter-otlp-http-trace")
implementation("io.opentelemetry:opentelemetry-exporter-otlp-http-metrics")
implementation("io.opentelemetry:opentelemetry-exporter-otlp-http-logs")
implementation("io.opentelemetry:opentelemetry-exporter-logging-otlp")

implementation("io.opentelemetry:opentelemetry-exporter-prometheus")
implementation("io.prometheus:simpleclient")
implementation("io.prometheus:simpleclient_httpserver")

implementation("io.opentelemetry:opentelemetry-exporter-zipkin")

api("net.bytebuddy:byte-buddy-dep")
implementation("org.slf4j:slf4j-api")
Expand Down
19 changes: 3 additions & 16 deletions javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@ val javaagentLibs by configurations.creating {
isCanBeConsumed = false
extendsFrom(baseJavaagentLibs)
}
// this configuration collects just exporter libs (also placed in the agent classloader & isolated from the instrumented application)
val exporterLibs by configurations.creating {
isCanBeResolved = true
isCanBeConsumed = false
}

// exclude dependencies that are to be placed in bootstrap from agent libs - they won't be added to inst/
listOf(baseJavaagentLibs, javaagentLibs, exporterLibs).forEach {
listOf(baseJavaagentLibs, javaagentLibs).forEach {
it.run {
exclude("org.slf4j")
exclude("io.opentelemetry", "opentelemetry-api")
Expand Down Expand Up @@ -69,8 +65,6 @@ dependencies {
baseJavaagentLibs(project(":instrumentation:internal:internal-reflection:javaagent"))
baseJavaagentLibs(project(":instrumentation:internal:internal-url-class-loader:javaagent"))

exporterLibs(project(":javaagent-exporters"))

// concurrentlinkedhashmap-lru and weak-lock-free are copied in to the instrumentation-api module
licenseReportDependencies("com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2")
licenseReportDependencies("com.blogspot.mydailyjava:weak-lock-free:0.18")
Expand Down Expand Up @@ -135,19 +129,12 @@ tasks {
excludeBootstrapJars()
}

val relocateExporterLibs by registering(ShadowJar::class) {
configurations = listOf(exporterLibs)

archiveFileName.set("exporterLibs-relocated.jar")
}

// Includes everything needed for OOTB experience
val shadowJar by existing(ShadowJar::class) {
configurations = listOf(bootstrapLibs)

dependsOn(relocateJavaagentLibs, relocateExporterLibs)
dependsOn(relocateJavaagentLibs)
isolateClasses(relocateJavaagentLibs.get().outputs.files)
isolateClasses(relocateExporterLibs.get().outputs.files)

duplicatesStrategy = DuplicatesStrategy.EXCLUDE

Expand Down
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ include(":muzzle")
include(":opentelemetry-api-shaded-for-instrumenting")
include(":opentelemetry-ext-annotations-shaded-for-instrumenting")
include(":javaagent-bootstrap")
include(":javaagent-exporters")
include(":javaagent-extension-api")
include(":javaagent-tooling")
include(":javaagent-tooling:javaagent-tooling-java9")
Expand Down

0 comments on commit 8d6d4fb

Please sign in to comment.