Skip to content

Commit

Permalink
Remove gRPC dependency for export (#4674)
Browse files Browse the repository at this point in the history
  • Loading branch information
anuraaga authored Nov 19, 2021
1 parent e6a9a6f commit bcae1b1
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 16 deletions.
4 changes: 0 additions & 4 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}")
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

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;
Expand All @@ -26,7 +25,7 @@
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

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;
Expand All @@ -26,7 +25,7 @@
@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
2 changes: 0 additions & 2 deletions javaagent-exporters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ dependencies {
implementation("io.prometheus:simpleclient_httpserver")

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

implementation("io.grpc:grpc-netty-shaded")
}
1 change: 0 additions & 1 deletion javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit bcae1b1

Please sign in to comment.