Remove gRPC dependency for export
MODIFY
dependencyManagement/build.gradle.kts
dependencyManagement/build.gradle.kts
@@ -11,10 +11,7 @@ data class DependencySet(val group: String, val version: String, val modules: Li
val dependencyVersions = hashMapOf<String, String>()
rootProject.extra["versions"] = dependencyVersions
-// IMPORTANT when updating otelVersion, make sure that grpcVersion below is >= the grpc version
-// used by that otel version
val otelVersion = "1.9.0"
-val grpcVersion = "1.41.0"
rootProject.extra["otelVersion"] = otelVersion
// Need both BOM and -all
@@ -116,7 +113,6 @@ val DEPENDENCIES = listOf(
"org.spockframework:spock-junit4:2.0-groovy-2.5",
"org.scala-lang:scala-library:2.11.12",
"org.springframework.boot:spring-boot-dependencies:2.3.1.RELEASE",
- "io.grpc:grpc-netty-shaded:${grpcVersion}",
)
javaPlatform {

MODIFY
instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts
instrumentation/spring/spring-boot-autoconfigure/build.gradle.kts
@@ -29,7 +29,6 @@ dependencies {
compileOnly("io.opentelemetry:opentelemetry-exporter-jaeger")
compileOnly("io.opentelemetry:opentelemetry-exporter-otlp")
compileOnly("io.opentelemetry:opentelemetry-exporter-zipkin")
- compileOnly("io.grpc:grpc-api:1.30.2")
testImplementation("org.springframework.boot:spring-boot-starter-aop:${versions["org.springframework.boot"]}")
testImplementation("org.springframework.boot:spring-boot-starter-webflux:${versions["org.springframework.boot"]}")
@@ -49,8 +48,6 @@ dependencies {
testImplementation("io.opentelemetry:opentelemetry-exporter-jaeger")
testImplementation("io.opentelemetry:opentelemetry-exporter-otlp")
testImplementation("io.opentelemetry:opentelemetry-exporter-zipkin")
- testImplementation("io.grpc:grpc-api:1.30.2")
- testImplementation("io.grpc:grpc-netty-shaded:1.30.2")
testImplementation(project(":instrumentation-api-annotation-support"))
// this only exists to make Intellij happy since it doesn't (currently at least) understand our

MODIFY
instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/exporters/jaeger/JaegerSpanExporterAutoConfiguration.java
instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/exporters/jaeger/JaegerSpanExporterAutoConfiguration.java
package io.opentelemetry.instrumentation.spring.autoconfigure.exporters.jaeger;
-import io.grpc.ManagedChannel;
import io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporter;
import io.opentelemetry.exporter.jaeger.JaegerGrpcSpanExporterBuilder;
import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration;
@@ -26,7 +25,7 @@ import org.springframework.context.annotation.Configuration;
@AutoConfigureBefore(OpenTelemetryAutoConfiguration.class)
@EnableConfigurationProperties(JaegerSpanExporterProperties.class)
@ConditionalOnProperty(prefix = "otel.exporter.jaeger", name = "enabled", matchIfMissing = true)
-@ConditionalOnClass({JaegerGrpcSpanExporter.class, ManagedChannel.class})
+@ConditionalOnClass(JaegerGrpcSpanExporter.class)
public class JaegerSpanExporterAutoConfiguration {
@Bean

MODIFY
instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/exporters/otlp/OtlpGrpcSpanExporterAutoConfiguration.java
instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/exporters/otlp/OtlpGrpcSpanExporterAutoConfiguration.java
package io.opentelemetry.instrumentation.spring.autoconfigure.exporters.otlp;
-import io.grpc.ManagedChannel;
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporterBuilder;
import io.opentelemetry.instrumentation.spring.autoconfigure.OpenTelemetryAutoConfiguration;
@@ -26,7 +25,7 @@ import org.springframework.context.annotation.Configuration;
@AutoConfigureBefore(OpenTelemetryAutoConfiguration.class)
@EnableConfigurationProperties(OtlpGrpcSpanExporterProperties.class)
@ConditionalOnProperty(prefix = "otel.exporter.otlp", name = "enabled", matchIfMissing = true)
-@ConditionalOnClass({OtlpGrpcSpanExporter.class, ManagedChannel.class})
+@ConditionalOnClass(OtlpGrpcSpanExporter.class)
public class OtlpGrpcSpanExporterAutoConfiguration {
@Bean

MODIFY
instrumentation/spring/starters/jaeger-exporter-starter/build.gradle.kts
instrumentation/spring/starters/jaeger-exporter-starter/build.gradle.kts
@@ -11,5 +11,4 @@ dependencies {
api("org.springframework.boot:spring-boot-starter:${versions["org.springframework.boot"]}")
api(project(":instrumentation:spring:starters:spring-starter"))
api("io.opentelemetry:opentelemetry-exporter-jaeger")
- implementation("io.grpc:grpc-netty-shaded:1.30.2")
}

MODIFY
instrumentation/spring/starters/otlp-exporter-starter/build.gradle.kts
instrumentation/spring/starters/otlp-exporter-starter/build.gradle.kts
@@ -11,5 +11,4 @@ dependencies {
api("org.springframework.boot:spring-boot-starter:${versions["org.springframework.boot"]}")
api(project(":instrumentation:spring:starters:spring-starter"))
api("io.opentelemetry:opentelemetry-exporter-otlp")
- implementation("io.grpc:grpc-netty-shaded:1.30.2")
}

MODIFY
javaagent-exporters/build.gradle.kts
javaagent-exporters/build.gradle.kts
@@ -17,6 +17,4 @@ dependencies {
implementation("io.prometheus:simpleclient_httpserver")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
-
- implementation("io.grpc:grpc-netty-shaded")
}

MODIFY
javaagent/build.gradle.kts
javaagent/build.gradle.kts
@@ -83,7 +83,6 @@ dependencies {
exporterSlimLibs("io.opentelemetry:opentelemetry-exporter-otlp")
exporterSlimLibs("io.opentelemetry:opentelemetry-exporter-otlp-metrics")
- exporterSlimLibs("io.grpc:grpc-okhttp:1.41.0")
// We only have compileOnly dependencies on these to make sure they don't leak into POMs.
licenseReportDependencies("com.github.ben-manes.caffeine:caffeine:$caffeine3Version") {

Remove gRPC dependency for export (#4674)