From 51581681c27e7bfc2c0e21de256cba96f0878c37 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Jul 2026 16:34:02 +0000 Subject: [PATCH 1/7] SOLR-18310: Switch opentelemetry module from OkHttp sender to JDK HTTP sender --- .../update-opentelemetry-exporter.yml | 33 +++++++++++++++++++ gradle/libs.versions.toml | 1 + .../metrics/otel/MetricExporterFactory.java | 2 +- solr/cross-dc-manager/gradle.lockfile | 25 +------------- solr/licenses/grpc-netty-1.82.0.jar.sha1 | 1 - .../netty-codec-http2-4.2.15.Final.jar.sha1 | 1 - .../netty-codec-socks-4.2.15.Final.jar.sha1 | 1 - .../netty-handler-proxy-4.2.15.Final.jar.sha1 | 1 - ...emetry-exporter-sender-jdk-1.56.0.jar.sha1 | 1 + ...try-exporter-sender-okhttp-1.56.0.jar.sha1 | 1 - ...proto-google-common-protos-2.64.1.jar.sha1 | 1 - solr/modules/opentelemetry/build.gradle | 15 +++++---- solr/modules/opentelemetry/gradle.lockfile | 28 ++-------------- .../opentelemetry/OtelTracerConfigurator.java | 2 +- .../pages/distributed-tracing.adoc | 17 ++++++---- .../pages/major-changes-in-solr-10.adoc | 7 ++++ 16 files changed, 65 insertions(+), 72 deletions(-) create mode 100644 changelog/unreleased/update-opentelemetry-exporter.yml delete mode 100644 solr/licenses/grpc-netty-1.82.0.jar.sha1 delete mode 100644 solr/licenses/netty-codec-http2-4.2.15.Final.jar.sha1 delete mode 100644 solr/licenses/netty-codec-socks-4.2.15.Final.jar.sha1 delete mode 100644 solr/licenses/netty-handler-proxy-4.2.15.Final.jar.sha1 create mode 100644 solr/licenses/opentelemetry-exporter-sender-jdk-1.56.0.jar.sha1 delete mode 100644 solr/licenses/opentelemetry-exporter-sender-okhttp-1.56.0.jar.sha1 delete mode 100644 solr/licenses/proto-google-common-protos-2.64.1.jar.sha1 diff --git a/changelog/unreleased/update-opentelemetry-exporter.yml b/changelog/unreleased/update-opentelemetry-exporter.yml new file mode 100644 index 000000000000..c459197a9e44 --- /dev/null +++ b/changelog/unreleased/update-opentelemetry-exporter.yml @@ -0,0 +1,33 @@ +# (DELETE ALL COMMENTS UP HERE AFTER FILLING THIS IN + +# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc + +# If the change is minor, don't bother adding a changelog entry. +# For `other` type entries, the threshold to bother with a changelog entry should be even higher. + +# title: +# * The audience is end-users and administrators, not committers. +# * Be short and focused on the user impact. Multiple sentences is fine! +# * For technical/geeky details, prefer the commit message instead of changelog. +# * Reference JIRA issues like `SOLR-12345`, or if no JIRA but have a GitHub PR then `PR#12345`. + +# type: +# `added` for new features/improvements, opt-in by the user typically documented in the ref guide +# `changed` for improvements; not opt-in +# `fixed` for improvements that are deemed to have fixed buggy behavior +# `deprecated` for marking things deprecated +# `removed` for code removed +# `dependency_update` for updates to dependencies +# `other` for anything else, like large/significant refactorings, build changes, +# test infrastructure, or documentation. +# Most such changes are too small/minor to bother with a changelog entry. + +title: > + SOLR-18310: The opentelemetry module now uses the JDK HTTP sender instead of OkHttp, reducing + transitive dependencies. The default OTLP export protocol has changed from gRPC (port 4317) to + HTTP/Protobuf (port 4318). gRPC transport is no longer supported out of the box; users who need + it can add the required gRPC, OkHttp, and Protobuf jars to the opentelemetry module's lib directory. +type: dependency_update +authors: + - name: copilot-swe-agent[bot] + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ad0aa4db6103..195905469d91 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -486,6 +486,7 @@ opentelemetry-api = { module = "io.opentelemetry:opentelemetry-api", version.ref opentelemetry-bom = { module = "io.opentelemetry:opentelemetry-bom", version.ref = "opentelemetry" } opentelemetry-context = { module = "io.opentelemetry:opentelemetry-context", version.ref = "opentelemetry" } opentelemetry-exporter-otlp = { module = "io.opentelemetry:opentelemetry-exporter-otlp", version.ref = "opentelemetry" } +opentelemetry-exporter-sender-jdk = { module = "io.opentelemetry:opentelemetry-exporter-sender-jdk", version.ref = "opentelemetry" } opentelemetry-exporter-prometheus = { module = "io.opentelemetry:opentelemetry-exporter-prometheus", version.ref = "opentelemetry-prometheus" } opentelemetry-runtime-telemetry = { module = "io.opentelemetry.instrumentation:opentelemetry-runtime-telemetry-java17", version.ref = "opentelemetry-runtime-telemetry" } opentelemetry-sdk = { module = "io.opentelemetry:opentelemetry-sdk", version.ref = "opentelemetry" } diff --git a/solr/core/src/java/org/apache/solr/metrics/otel/MetricExporterFactory.java b/solr/core/src/java/org/apache/solr/metrics/otel/MetricExporterFactory.java index d0ac8219aa33..e6f1f24e85c2 100644 --- a/solr/core/src/java/org/apache/solr/metrics/otel/MetricExporterFactory.java +++ b/solr/core/src/java/org/apache/solr/metrics/otel/MetricExporterFactory.java @@ -25,7 +25,7 @@ public interface MetricExporterFactory { Boolean.parseBoolean(EnvUtils.getProperty("solr.metrics.otlpExporterEnabled", "false")); public static final String OTLP_EXPORTER_PROTOCOL = - EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "grpc"); + EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "http"); public static final int OTLP_EXPORTER_INTERVAL = Integer.parseInt(EnvUtils.getProperty("solr.metrics.otlpExporterInterval", "60000")); diff --git a/solr/cross-dc-manager/gradle.lockfile b/solr/cross-dc-manager/gradle.lockfile index 829aa69a750e..80f332fc2bd4 100644 --- a/solr/cross-dc-manager/gradle.lockfile +++ b/solr/cross-dc-manager/gradle.lockfile @@ -19,8 +19,6 @@ com.fasterxml.woodstox:woodstox-core:7.2.1=jarValidation,runtimeClasspath,runtim com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testRuntimeClasspath com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,errorprone,testAnnotationProcessor com.github.luben:zstd-jni:1.5.6-4=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath -com.google.android:annotations:4.1.1.4=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.google.api.grpc:proto-google-common-protos:2.64.1=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,errorprone,testAnnotationProcessor com.google.auto.value:auto-value-annotations:1.11.1=annotationProcessor,errorprone,testAnnotationProcessor com.google.auto:auto-common:1.2.2=annotationProcessor,errorprone,testAnnotationProcessor @@ -40,10 +38,6 @@ com.google.protobuf:protobuf-java:4.35.1=annotationProcessor,errorprone,jarValid com.j256.simplemagic:simplemagic:1.17=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath com.jayway.jsonpath:json-path:3.0.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath com.lmax:disruptor:4.0.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath -com.squareup.okhttp3:okhttp-jvm:5.4.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.squareup.okhttp3:okhttp:5.4.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.squareup.okio:okio-jvm:3.17.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.squareup.okio:okio:3.17.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath com.thoughtworks.paranamer:paranamer:2.8.3=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath com.typesafe.scala-logging:scala-logging_2.13:3.9.5=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath @@ -58,23 +52,9 @@ commons-validator:commons-validator:1.10.1=jarValidation,runtimeClasspath,runtim io.dropwizard.metrics:metrics-core:4.2.39=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,errorprone,testAnnotationProcessor io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,errorprone,testAnnotationProcessor -io.grpc:grpc-api:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-context:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-core:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-netty:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-protobuf-lite:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-protobuf:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-stub:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-util:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-bom:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.netty:netty-buffer:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.netty:netty-codec-base:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath -io.netty:netty-codec-compression:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-codec-http2:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-codec-http:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-codec-socks:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.netty:netty-common:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath -io.netty:netty-handler-proxy:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.netty:netty-handler:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.netty:netty-resolver:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.netty:netty-tcnative-boringssl-static:2.0.79.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath @@ -97,7 +77,7 @@ io.opentelemetry:opentelemetry-exporter-common:1.56.0=jarValidation,runtimeClass io.opentelemetry:opentelemetry-exporter-otlp-common:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.opentelemetry:opentelemetry-exporter-otlp:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.opentelemetry:opentelemetry-exporter-prometheus:1.56.0-alpha=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath -io.opentelemetry:opentelemetry-exporter-sender-okhttp:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath +io.opentelemetry:opentelemetry-exporter-sender-jdk:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-common:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath @@ -105,7 +85,6 @@ io.opentelemetry:opentelemetry-sdk-logs:1.56.0=jarValidation,runtimeClasspath,ru io.opentelemetry:opentelemetry-sdk-metrics:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-trace:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath -io.perfmark:perfmark-api:0.27.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.prometheus:prometheus-metrics-exposition-formats:1.1.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath io.prometheus:prometheus-metrics-model:1.1.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath io.sgr:s2-geometry-library-java:1.0.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath @@ -217,8 +196,6 @@ org.glassfish.jersey.media:jersey-media-json-jackson:4.0.2=jarValidation,runtime org.glassfish.jersey:jersey-bom:4.0.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath org.hamcrest:hamcrest:3.0=jarValidation,testCompileClasspath,testRuntimeClasspath org.javassist:javassist:3.30.2-GA=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:2.2.21=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -org.jetbrains:annotations:26.1.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath org.jspecify:jspecify:1.0.0=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.6.2=jarValidation,testRuntimeClasspath org.junit.platform:junit-platform-commons:1.6.2=jarValidation,testRuntimeClasspath diff --git a/solr/licenses/grpc-netty-1.82.0.jar.sha1 b/solr/licenses/grpc-netty-1.82.0.jar.sha1 deleted file mode 100644 index ad9bc971adda..000000000000 --- a/solr/licenses/grpc-netty-1.82.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -bb2e92c518f044a194fbc06a769a1ec89efa3544 diff --git a/solr/licenses/netty-codec-http2-4.2.15.Final.jar.sha1 b/solr/licenses/netty-codec-http2-4.2.15.Final.jar.sha1 deleted file mode 100644 index 68fe44b7d9b2..000000000000 --- a/solr/licenses/netty-codec-http2-4.2.15.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -c70540243427c8c952473f55813c6d459817de42 diff --git a/solr/licenses/netty-codec-socks-4.2.15.Final.jar.sha1 b/solr/licenses/netty-codec-socks-4.2.15.Final.jar.sha1 deleted file mode 100644 index 6adae6986809..000000000000 --- a/solr/licenses/netty-codec-socks-4.2.15.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5d6dc38231104f28b6ba48b77d2f90b93cdb6fe7 diff --git a/solr/licenses/netty-handler-proxy-4.2.15.Final.jar.sha1 b/solr/licenses/netty-handler-proxy-4.2.15.Final.jar.sha1 deleted file mode 100644 index cdf1b264bb2e..000000000000 --- a/solr/licenses/netty-handler-proxy-4.2.15.Final.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -31e63e04af11da75793ecbfc126d7691b8771d01 diff --git a/solr/licenses/opentelemetry-exporter-sender-jdk-1.56.0.jar.sha1 b/solr/licenses/opentelemetry-exporter-sender-jdk-1.56.0.jar.sha1 new file mode 100644 index 000000000000..4b0746ab0c9f --- /dev/null +++ b/solr/licenses/opentelemetry-exporter-sender-jdk-1.56.0.jar.sha1 @@ -0,0 +1 @@ +a444a2c56f7b40cbde39bc542523a912811b7d97 diff --git a/solr/licenses/opentelemetry-exporter-sender-okhttp-1.56.0.jar.sha1 b/solr/licenses/opentelemetry-exporter-sender-okhttp-1.56.0.jar.sha1 deleted file mode 100644 index 7aaf975e4de2..000000000000 --- a/solr/licenses/opentelemetry-exporter-sender-okhttp-1.56.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -5cc7baa0fe03a47f1af52193f480b7d9d8d2a767 diff --git a/solr/licenses/proto-google-common-protos-2.64.1.jar.sha1 b/solr/licenses/proto-google-common-protos-2.64.1.jar.sha1 deleted file mode 100644 index 371f2bdcaaa5..000000000000 --- a/solr/licenses/proto-google-common-protos-2.64.1.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -a71d9a9867ed792e54e893b8c7864a0ba1b022cf diff --git a/solr/modules/opentelemetry/build.gradle b/solr/modules/opentelemetry/build.gradle index b14d3868e41b..53d5e371b6fb 100644 --- a/solr/modules/opentelemetry/build.gradle +++ b/solr/modules/opentelemetry/build.gradle @@ -23,7 +23,6 @@ dependencies { implementation platform(project(':platform')) implementation project(':solr:core') - implementation platform(libs.netty.bom) implementation platform(libs.opentelemetry.bom) implementation libs.slf4j.api @@ -32,16 +31,18 @@ dependencies { implementation libs.opentelemetry.sdk implementation libs.opentelemetry.sdk.metrics implementation libs.opentelemetry.sdk.extension.autoconfigure - implementation libs.opentelemetry.exporter.otlp + implementation(libs.opentelemetry.exporter.otlp) { + // Exclude the OkHttp-based sender; we use the JDK HTTP sender to reduce transitive dependencies + exclude group: 'io.opentelemetry', module: 'opentelemetry-exporter-sender-okhttp' + } // End users must recompile with jaeger exporter and/or zipkin exporter if they need these // NOTE: sdk-autoconfigure needs both opentelemetry-sdk-metrics and opentelemetry-sdk-logs even if we don't use them - // gRPC transport via netty - since we already ship netty this is more lightweight than netty-shaded - runtimeOnly libs.grpc.netty - runtimeOnly libs.grpc.protobuf - runtimeOnly libs.grpc.stub - runtimeOnly libs.grpc.context + // JDK HTTP sender (Java 11+) — avoids pulling in OkHttp and gRPC transitive dependencies. + // gRPC transport is not supported out of the box; users who need it can add the required + // gRPC and OkHttp artifacts to the opentelemetry module's lib directory. + runtimeOnly libs.opentelemetry.exporter.sender.jdk // See https://issues.apache.org/jira/browse/LOG4J2-3609 due to needing these annotations compileOnly libs.apache.tomcat.annotationsapi diff --git a/solr/modules/opentelemetry/gradle.lockfile b/solr/modules/opentelemetry/gradle.lockfile index 02eab7c04c66..38d774756260 100644 --- a/solr/modules/opentelemetry/gradle.lockfile +++ b/solr/modules/opentelemetry/gradle.lockfile @@ -14,12 +14,9 @@ com.fasterxml.jackson:jackson-bom:2.22.0=compileClasspath,jarValidation,runtimeC com.fasterxml.woodstox:woodstox-core:7.2.1=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath com.github.ben-manes.caffeine:caffeine:3.2.4=annotationProcessor,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testRuntimeClasspath com.github.kevinstern:software-and-algorithms:1.0=annotationProcessor,errorprone,testAnnotationProcessor -com.google.android:annotations:4.1.1.4=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.google.api.grpc:proto-google-common-protos:2.64.1=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath com.google.auto.service:auto-service-annotations:1.0.1=annotationProcessor,errorprone,testAnnotationProcessor com.google.auto.value:auto-value-annotations:1.11.1=annotationProcessor,errorprone,testAnnotationProcessor com.google.auto:auto-common:1.2.2=annotationProcessor,errorprone,testAnnotationProcessor -com.google.code.gson:gson:2.14.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath com.google.errorprone:error_prone_annotation:2.41.0=annotationProcessor,errorprone,testAnnotationProcessor com.google.errorprone:error_prone_annotations:2.47.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath com.google.errorprone:error_prone_annotations:2.49.0=annotationProcessor,errorprone,testAnnotationProcessor @@ -30,14 +27,10 @@ com.google.guava:failureaccess:1.0.3=annotationProcessor,compileClasspath,errorp com.google.guava:guava:33.6.0-jre=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath -com.google.protobuf:protobuf-java:4.35.1=annotationProcessor,errorprone,jarValidation,runtimeClasspath,runtimeLibs,testAnnotationProcessor,testRuntimeClasspath +com.google.protobuf:protobuf-java:4.35.1=annotationProcessor,errorprone,testAnnotationProcessor com.j256.simplemagic:simplemagic:1.17=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath com.jayway.jsonpath:json-path:3.0.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath com.lmax:disruptor:4.0.0=solrPlatformLibs -com.squareup.okhttp3:okhttp-jvm:5.4.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.squareup.okhttp3:okhttp:5.4.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.squareup.okio:okio-jvm:3.17.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -com.squareup.okio:okio:3.17.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath com.tdunning:t-digest:3.3=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath commons-cli:commons-cli:1.11.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath commons-codec:commons-codec:1.22.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath @@ -45,23 +38,9 @@ commons-io:commons-io:2.22.0=compileClasspath,jarValidation,runtimeClasspath,run io.dropwizard.metrics:metrics-core:4.2.39=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,errorprone,testAnnotationProcessor io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,errorprone,testAnnotationProcessor -io.grpc:grpc-api:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-context:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-core:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-netty:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-protobuf-lite:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-protobuf:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-stub:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.grpc:grpc-util:1.82.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-bom:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath io.netty:netty-buffer:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.netty:netty-codec-base:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath -io.netty:netty-codec-compression:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-codec-http2:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-codec-http:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -io.netty:netty-codec-socks:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.netty:netty-common:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath -io.netty:netty-handler-proxy:4.2.15.Final=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.netty:netty-handler:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.netty:netty-resolver:4.2.15.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.netty:netty-tcnative-boringssl-static:2.0.79.Final=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath @@ -84,7 +63,7 @@ io.opentelemetry:opentelemetry-exporter-common:1.56.0=jarValidation,runtimeClass io.opentelemetry:opentelemetry-exporter-otlp-common:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.opentelemetry:opentelemetry-exporter-otlp:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath io.opentelemetry:opentelemetry-exporter-prometheus:1.56.0-alpha=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath -io.opentelemetry:opentelemetry-exporter-sender-okhttp:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath +io.opentelemetry:opentelemetry-exporter-sender-jdk:1.56.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-common:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,testCompileClasspath,testRuntimeClasspath @@ -93,7 +72,6 @@ io.opentelemetry:opentelemetry-sdk-metrics:1.56.0=compileClasspath,jarValidation io.opentelemetry:opentelemetry-sdk-testing:1.56.0=jarValidation,testCompileClasspath,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk-trace:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath io.opentelemetry:opentelemetry-sdk:1.56.0=compileClasspath,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testCompileClasspath,testRuntimeClasspath -io.perfmark:perfmark-api:0.27.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath io.prometheus:prometheus-metrics-exposition-formats:1.1.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath io.prometheus:prometheus-metrics-model:1.1.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath io.sgr:s2-geometry-library-java:1.0.0=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath @@ -182,8 +160,6 @@ org.glassfish.jersey.media:jersey-media-json-jackson:4.0.2=jarValidation,runtime org.glassfish.jersey:jersey-bom:4.0.2=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath org.hamcrest:hamcrest:3.0=jarValidation,testCompileClasspath,testRuntimeClasspath org.javassist:javassist:3.30.2-GA=jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testRuntimeClasspath -org.jetbrains.kotlin:kotlin-stdlib:2.2.21=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath -org.jetbrains:annotations:26.1.0=jarValidation,runtimeClasspath,runtimeLibs,testRuntimeClasspath org.jspecify:jspecify:1.0.0=annotationProcessor,compileClasspath,errorprone,jarValidation,runtimeClasspath,runtimeLibs,solrPlatformLibs,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath org.junit.jupiter:junit-jupiter-api:5.6.2=jarValidation,testRuntimeClasspath org.junit.platform:junit-platform-commons:1.6.2=jarValidation,testRuntimeClasspath diff --git a/solr/modules/opentelemetry/src/java/org/apache/solr/opentelemetry/OtelTracerConfigurator.java b/solr/modules/opentelemetry/src/java/org/apache/solr/opentelemetry/OtelTracerConfigurator.java index c70acee63c2c..ae1aa625991c 100644 --- a/solr/modules/opentelemetry/src/java/org/apache/solr/opentelemetry/OtelTracerConfigurator.java +++ b/solr/modules/opentelemetry/src/java/org/apache/solr/opentelemetry/OtelTracerConfigurator.java @@ -71,7 +71,7 @@ void prepareConfiguration(NamedList args) { injectPluginSettingsIfNotConfigured(args); setDefaultIfNotConfigured("OTEL_SERVICE_NAME", "solr"); setDefaultIfNotConfigured("OTEL_TRACES_EXPORTER", "otlp"); - setDefaultIfNotConfigured("OTEL_EXPORTER_OTLP_PROTOCOL", "grpc"); + setDefaultIfNotConfigured("OTEL_EXPORTER_OTLP_PROTOCOL", "http/protobuf"); setDefaultIfNotConfigured("OTEL_TRACES_SAMPLER", "parentbased_always_on"); setDefaultIfNotConfigured("OTEL_PROPAGATORS", "tracecontext,baggage"); if (EnvUtils.getProperty("host") != null) { diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc index fb4cdb050cc3..116f5bfeb2a5 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc @@ -18,7 +18,7 @@ Solr includes a general tracing framework based on OpenTracing that can be used to trace the lifecycle of a request for performance monitoring. -Tracing data can be configured to send to various backends, either directly or via an agent. Solr can send traces directly in OTLP/gRPC format. You can support many other destinations and cloud providers by installing an agent on each node and sending traces to localhost. +Tracing data can be configured to send to various backends, either directly or via an agent. Solr can send traces directly in OTLP/HTTP format. You can support many other destinations and cloud providers by installing an agent on each node and sending traces to localhost. A sampled distributed tracing query request displayed in Jaeger UI looks like this: @@ -39,7 +39,7 @@ This plugin can be disabled by setting the `solr.tracing.always.on.enabled` syst The `TracerConfigurator` is a class used to provide an instance of `io.opentracing.Tracer` based on configuration in `solr.xml`. These are pluggable, and each plugin is shipped as a xref:configuration-guide:solr-modules.adoc[Solr Module]: -**opentelemetry**: The `opentelemetry` module supports OTLP over gRPC or HTTP. +**opentelemetry**: The `opentelemetry` module supports OTLP over HTTP. A setup of a `TracerConfigurator` in `solr.xml` looks like this: @@ -70,24 +70,27 @@ Enable the module with either system property `-Dsolr.modules=opentelemetry` or The tracer can be configured through environment variables or Java system properties, see https://opentelemetry.io/docs/reference/specification/sdk-environment-variables/[OTEL SDK Environment Variables] and https://github.com/open-telemetry/opentelemetry-java/blob/v{dep-version-opentelemetry}/sdk-extensions/autoconfigure/README.md[Java SDK Autoconfigure]. -The default configuration will ship traces to a collector running on localhost, using https://opentelemetry.io/docs/reference/specification/protocol/[OTLP] over https://grpc.io[gRPC], and will propagate trace IDs using https://www.w3.org/TR/trace-context/[W3C TraceContext]. Here are the environment settings that are enabled by default: +The default configuration will ship traces to a collector running on localhost, using https://opentelemetry.io/docs/reference/specification/protocol/[OTLP] over HTTP (Protobuf), and will propagate trace IDs using https://www.w3.org/TR/trace-context/[W3C TraceContext]. Here are the environment settings that are enabled by default: [source,bash] ---- OTEL_SDK_DISABLED=false OTEL_SERVICE_NAME=solr OTEL_TRACES_EXPORTER=otlp -OTEL_EXPORTER_OTLP_PROTOCOL=grpc -OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317 +OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf +OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 OTEL_TRACES_SAMPLER=parentbased_always_on OTEL_PROPAGATORS=tracecontext,baggage ---- +NOTE: gRPC transport is not supported out of the box. +To use gRPC, you must add the required gRPC, OkHttp, and Protobuf jars to the `opentelemetry` module's lib directory and set `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. + Say you want to send traces to a remote https://opentelemetry.io/docs/collector/[OTEL Collector], with 10% sampling. That could be done with this configuration: [source,bash] ---- -OTEL_EXPORTER_OTLP_ENDPOINT=my-remote-collector:4317 +OTEL_EXPORTER_OTLP_ENDPOINT=http://my-remote-collector:4318 OTEL_TRACES_SAMPLER=parentbased_traceidratio OTEL_TRACES_SAMPLER_ARG=0.1 ---- @@ -96,7 +99,7 @@ An equivalent configuration using system properties would be: [source,bash] ---- -SOLR_OPTS=-Dotel.exporter.otlp.endpoint=my-remote-collector:4317 -Dotel.traces.sampler=parentbased_traceidratio -Dotel.traces.sampler.arg=0.1 +SOLR_OPTS=-Dotel.exporter.otlp.endpoint=http://my-remote-collector:4318 -Dotel.traces.sampler=parentbased_traceidratio -Dotel.traces.sampler.arg=0.1 ---- To add custom tags to the trace, use `OTEL_RESOURCE_ATTRIBUTES`: diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc index 762c5e440d80..39ed75d4a1a9 100644 --- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc +++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc @@ -390,6 +390,13 @@ A new feature vector cache was added that is used not only for feature logging b The new OTEL based metric system introduced in 10.0 is considered BETA, and some breaking changes are to be expected in this and coming minor releases. +==== OpenTelemetry Tracing Transport Changed to HTTP + +The `opentelemetry` module now uses the JDK HTTP sender (`opentelemetry-exporter-sender-jdk`) instead of OkHttp (`opentelemetry-exporter-sender-okhttp`) to reduce transitive dependencies. +As a result, gRPC transport is no longer supported out of the box, and the default export protocol has changed from `grpc` to `http/protobuf` (OTLP port `4318` instead of `4317`). + +Users who relied on gRPC transport can restore it by adding the required gRPC, OkHttp, and Protobuf jars to the `opentelemetry` module's lib directory and setting `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. + ==== OTLP Metric Names Changed to Dot-Separated Format *Breaking change for OTLP consumers.* From 83826f03b64d403381199c97dbe986e55a04afa6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Jul 2026 19:00:15 +0000 Subject: [PATCH 2/7] SOLR-18310: Keep libs.versions.toml sorted --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 195905469d91..fe7d4d6d756a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -486,8 +486,8 @@ opentelemetry-api = { module = "io.opentelemetry:opentelemetry-api", version.ref opentelemetry-bom = { module = "io.opentelemetry:opentelemetry-bom", version.ref = "opentelemetry" } opentelemetry-context = { module = "io.opentelemetry:opentelemetry-context", version.ref = "opentelemetry" } opentelemetry-exporter-otlp = { module = "io.opentelemetry:opentelemetry-exporter-otlp", version.ref = "opentelemetry" } -opentelemetry-exporter-sender-jdk = { module = "io.opentelemetry:opentelemetry-exporter-sender-jdk", version.ref = "opentelemetry" } opentelemetry-exporter-prometheus = { module = "io.opentelemetry:opentelemetry-exporter-prometheus", version.ref = "opentelemetry-prometheus" } +opentelemetry-exporter-sender-jdk = { module = "io.opentelemetry:opentelemetry-exporter-sender-jdk", version.ref = "opentelemetry" } opentelemetry-runtime-telemetry = { module = "io.opentelemetry.instrumentation:opentelemetry-runtime-telemetry-java17", version.ref = "opentelemetry-runtime-telemetry" } opentelemetry-sdk = { module = "io.opentelemetry:opentelemetry-sdk", version.ref = "opentelemetry" } opentelemetry-sdk-extension-autoconfigure = { module = "io.opentelemetry:opentelemetry-sdk-extension-autoconfigure", version.ref = "opentelemetry" } From 6e66c95da2bf4210b755616887e3689f17c7b19b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Jul 2026 19:08:50 +0000 Subject: [PATCH 3/7] SOLR-18310: Fix changelog entry and refresh lockfiles --- .../unreleased/SOLR-18310-otel-jdk-sender.yml | 11 +++++++ .../update-opentelemetry-exporter.yml | 33 ------------------- 2 files changed, 11 insertions(+), 33 deletions(-) create mode 100644 changelog/unreleased/SOLR-18310-otel-jdk-sender.yml delete mode 100644 changelog/unreleased/update-opentelemetry-exporter.yml diff --git a/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml b/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml new file mode 100644 index 000000000000..4d04a3eac3f4 --- /dev/null +++ b/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml @@ -0,0 +1,11 @@ +title: > + Switch the opentelemetry module from OkHttp to the JDK HTTP sender to reduce transitive dependencies. + The default OTLP export protocol changed from gRPC (port 4317) to HTTP/Protobuf (port 4318). + gRPC transport is no longer bundled; users who need it can add the required gRPC and OkHttp jars + to the opentelemetry module's lib directory. +type: dependency_update +authors: + - name: David Smiley +links: + - name: SOLR-18310 + url: https://issues.apache.org/jira/browse/SOLR-18310 diff --git a/changelog/unreleased/update-opentelemetry-exporter.yml b/changelog/unreleased/update-opentelemetry-exporter.yml deleted file mode 100644 index c459197a9e44..000000000000 --- a/changelog/unreleased/update-opentelemetry-exporter.yml +++ /dev/null @@ -1,33 +0,0 @@ -# (DELETE ALL COMMENTS UP HERE AFTER FILLING THIS IN - -# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc - -# If the change is minor, don't bother adding a changelog entry. -# For `other` type entries, the threshold to bother with a changelog entry should be even higher. - -# title: -# * The audience is end-users and administrators, not committers. -# * Be short and focused on the user impact. Multiple sentences is fine! -# * For technical/geeky details, prefer the commit message instead of changelog. -# * Reference JIRA issues like `SOLR-12345`, or if no JIRA but have a GitHub PR then `PR#12345`. - -# type: -# `added` for new features/improvements, opt-in by the user typically documented in the ref guide -# `changed` for improvements; not opt-in -# `fixed` for improvements that are deemed to have fixed buggy behavior -# `deprecated` for marking things deprecated -# `removed` for code removed -# `dependency_update` for updates to dependencies -# `other` for anything else, like large/significant refactorings, build changes, -# test infrastructure, or documentation. -# Most such changes are too small/minor to bother with a changelog entry. - -title: > - SOLR-18310: The opentelemetry module now uses the JDK HTTP sender instead of OkHttp, reducing - transitive dependencies. The default OTLP export protocol has changed from gRPC (port 4317) to - HTTP/Protobuf (port 4318). gRPC transport is no longer supported out of the box; users who need - it can add the required gRPC, OkHttp, and Protobuf jars to the opentelemetry module's lib directory. -type: dependency_update -authors: - - name: copilot-swe-agent[bot] - From bcb434d17f93dced84717ce30ef5b5dbe1a6c310 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 18 Jul 2026 19:59:54 +0000 Subject: [PATCH 4/7] SOLR-18310: Improve gRPC restore note in distributed-tracing.adoc with Maven Central link --- .../modules/deployment-guide/pages/distributed-tracing.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc index 116f5bfeb2a5..3e1c6d1bb2fe 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc @@ -84,7 +84,8 @@ OTEL_PROPAGATORS=tracecontext,baggage ---- NOTE: gRPC transport is not supported out of the box. -To use gRPC, you must add the required gRPC, OkHttp, and Protobuf jars to the `opentelemetry` module's lib directory and set `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. +To use gRPC, add the required gRPC, OkHttp, and Protobuf JARs to the `opentelemetry` module's lib directory and set `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. +Look up the full list of runtime JARs needed at https://central.sonatype.com/artifact/io.opentelemetry/opentelemetry-exporter-sender-okhttp/1.56.0/dependencies[opentelemetry-exporter-sender-okhttp on Maven Central] (replace `1.56.0` with the OpenTelemetry version bundled in your Solr release). Say you want to send traces to a remote https://opentelemetry.io/docs/collector/[OTEL Collector], with 10% sampling. That could be done with this configuration: From 9151d335c651a23aae4a424b9e8a6ee17ad1016f Mon Sep 17 00:00:00 2001 From: David Smiley Date: Mon, 20 Jul 2026 01:09:23 -0400 Subject: [PATCH 5/7] tweaks --- changelog/unreleased/SOLR-18310-otel-jdk-sender.yml | 6 ++---- solr/modules/opentelemetry/build.gradle | 9 ++------- solr/server/etc/security.policy | 3 +++ .../deployment-guide/pages/distributed-tracing.adoc | 11 +++++++---- .../upgrade-notes/pages/major-changes-in-solr-10.adoc | 8 ++++---- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml b/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml index 4d04a3eac3f4..6a0d31c28f06 100644 --- a/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml +++ b/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml @@ -1,8 +1,6 @@ title: > - Switch the opentelemetry module from OkHttp to the JDK HTTP sender to reduce transitive dependencies. - The default OTLP export protocol changed from gRPC (port 4317) to HTTP/Protobuf (port 4318). - gRPC transport is no longer bundled; users who need it can add the required gRPC and OkHttp jars - to the opentelemetry module's lib directory. + Removed OkHttp, gRPC, and Netty jars from the opentelemetry module. The OTLP/http protocol still + works but no longer uses additional dependencies. type: dependency_update authors: - name: David Smiley diff --git a/solr/modules/opentelemetry/build.gradle b/solr/modules/opentelemetry/build.gradle index 53d5e371b6fb..49877fbcd93c 100644 --- a/solr/modules/opentelemetry/build.gradle +++ b/solr/modules/opentelemetry/build.gradle @@ -32,16 +32,11 @@ dependencies { implementation libs.opentelemetry.sdk.metrics implementation libs.opentelemetry.sdk.extension.autoconfigure implementation(libs.opentelemetry.exporter.otlp) { - // Exclude the OkHttp-based sender; we use the JDK HTTP sender to reduce transitive dependencies + // Exclude the OkHttp-based sender; we use the JDK HTTP sender instead exclude group: 'io.opentelemetry', module: 'opentelemetry-exporter-sender-okhttp' } - // End users must recompile with jaeger exporter and/or zipkin exporter if they need these - // NOTE: sdk-autoconfigure needs both opentelemetry-sdk-metrics and opentelemetry-sdk-logs even if we don't use them - - // JDK HTTP sender (Java 11+) — avoids pulling in OkHttp and gRPC transitive dependencies. - // gRPC transport is not supported out of the box; users who need it can add the required - // gRPC and OkHttp artifacts to the opentelemetry module's lib directory. + // OTLP HTTP sender that requires no additional dependencies. runtimeOnly libs.opentelemetry.exporter.sender.jdk // See https://issues.apache.org/jira/browse/LOG4J2-3609 due to needing these annotations compileOnly libs.apache.tomcat.annotationsapi diff --git a/solr/server/etc/security.policy b/solr/server/etc/security.policy index f932cc0b461c..2dd03af0be24 100644 --- a/solr/server/etc/security.policy +++ b/solr/server/etc/security.policy @@ -215,6 +215,9 @@ grant { // expanded to a wildcard if set, allows all networking everywhere permission java.net.SocketPermission "${solr.internal.network.permission}", "accept,listen,connect,resolve"; + // java.net.http.HttpClient requires URLPermission separately from SocketPermission above. + permission java.net.URLPermission "http://${solr.internal.network.permission}:*/-", "*:*"; + permission java.net.URLPermission "https://${solr.internal.network.permission}:*/-", "*:*"; // CUDA for GPU module (cuVS) permission java.lang.RuntimePermission "loadLibrary.cudart"; diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc index 3e1c6d1bb2fe..fb60329ee036 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/distributed-tracing.adoc @@ -18,7 +18,10 @@ Solr includes a general tracing framework based on OpenTracing that can be used to trace the lifecycle of a request for performance monitoring. -Tracing data can be configured to send to various backends, either directly or via an agent. Solr can send traces directly in OTLP/HTTP format. You can support many other destinations and cloud providers by installing an agent on each node and sending traces to localhost. +Tracing data can be configured to send to various backends, either directly or via an agent. +Solr can send traces directly in OTLP/HTTP format with the opentelemetry module, out-of-the-box. +Other protocols, destinations and cloud providers may be supported. +For example, gRPC can be supported by adding more JARs and tweaking configuration. A sampled distributed tracing query request displayed in Jaeger UI looks like this: @@ -55,7 +58,8 @@ By doing this, some backends like DataDog are supported out of the box since htt == Open Telemetry Module -This module brings support for the industry standard https://opentelemetry.io[OpenTelemetry] (or short "OTEL") tracing, and exposes a tracer configurator that can be enabled in the `` tag of `solr.xml` as follows: +This module brings support for the industry standard https://opentelemetry.io[OpenTelemetry] ("OTEL"). +OTEL is broader than tracing, but nonetheless, Solr's focal configuration element for it in Solr is `` in `solr.xml` as follows: [source,xml] ---- @@ -84,8 +88,7 @@ OTEL_PROPAGATORS=tracecontext,baggage ---- NOTE: gRPC transport is not supported out of the box. -To use gRPC, add the required gRPC, OkHttp, and Protobuf JARs to the `opentelemetry` module's lib directory and set `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. -Look up the full list of runtime JARs needed at https://central.sonatype.com/artifact/io.opentelemetry/opentelemetry-exporter-sender-okhttp/1.56.0/dependencies[opentelemetry-exporter-sender-okhttp on Maven Central] (replace `1.56.0` with the OpenTelemetry version bundled in your Solr release). +To use gRPC, add the required gRPC and Netty JARs to the `opentelemetry` module's lib directory and set `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. Say you want to send traces to a remote https://opentelemetry.io/docs/collector/[OTEL Collector], with 10% sampling. That could be done with this configuration: diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc index 39ed75d4a1a9..e2f3c2bf1067 100644 --- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc +++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc @@ -390,12 +390,12 @@ A new feature vector cache was added that is used not only for feature logging b The new OTEL based metric system introduced in 10.0 is considered BETA, and some breaking changes are to be expected in this and coming minor releases. -==== OpenTelemetry Tracing Transport Changed to HTTP +==== OTLP protocols -The `opentelemetry` module now uses the JDK HTTP sender (`opentelemetry-exporter-sender-jdk`) instead of OkHttp (`opentelemetry-exporter-sender-okhttp`) to reduce transitive dependencies. -As a result, gRPC transport is no longer supported out of the box, and the default export protocol has changed from `grpc` to `http/protobuf` (OTLP port `4318` instead of `4317`). +The `opentelemetry` module no longer includes some dependencies, dropping gRPC support out-of-the-box. +The default export protocol has changed from `grpc` to `http/protobuf` (OTLP port `4318` instead of `4317`). -Users who relied on gRPC transport can restore it by adding the required gRPC, OkHttp, and Protobuf jars to the `opentelemetry` module's lib directory and setting `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. +Use of gRPC can be restored by adding the required gRPC & Netty jars to the `opentelemetry` module's lib directory and setting `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. ==== OTLP Metric Names Changed to Dot-Separated Format From 29ba510444e7da9e0f629c5dd90f5dc3bd4ea5cf Mon Sep 17 00:00:00 2001 From: David Smiley Date: Mon, 20 Jul 2026 09:25:24 -0400 Subject: [PATCH 6/7] tweak wording --- changelog/unreleased/SOLR-18310-otel-jdk-sender.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml b/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml index 6a0d31c28f06..93a8000d999f 100644 --- a/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml +++ b/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml @@ -1,6 +1,6 @@ title: > - Removed OkHttp, gRPC, and Netty jars from the opentelemetry module. The OTLP/http protocol still - works but no longer uses additional dependencies. + opentelemetry: the default OTLP sender is now http/protobuf port 4318 and with fewer/no JARs to do so. + JARs for others like gRPC have been removed but users can add as they need. type: dependency_update authors: - name: David Smiley From a7bc70147b71396e6746e461406ef4e824a1272e Mon Sep 17 00:00:00 2001 From: David Smiley Date: Mon, 20 Jul 2026 16:19:42 -0400 Subject: [PATCH 7/7] improve docs --- .../modules/deployment-guide/pages/metrics-reporting.adoc | 6 ++++-- .../upgrade-notes/pages/major-changes-in-solr-10.adoc | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc index 15a2d592f87d..adab80215801 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc @@ -312,7 +312,7 @@ http://localhost:8983/api/metrics?name=solr_core_index_size_bytes&collection=foo == OTLP -For users who do not use or support pulling metrics in Prometheus format with the `/metrics` API, Solr also supports pushing metrics natively with https://opentelemetry.io/docs/specs/otlp/[OTLP], which is a vendor-agnostic protocol for pushing metrics via gRPC or HTTP. +For users who do not use or support pulling metrics in Prometheus format with the `/metrics` API, Solr also supports pushing metrics natively with https://opentelemetry.io/docs/specs/otlp/[OTLP], which is a vendor-agnostic protocol for pushing metrics. OTLP is widely supported by many tools, vendors, and pipelines. See the OpenTelemetry https://opentelemetry.io/ecosystem/vendors/[vendors list] for more details on available and compatible options. @@ -341,11 +341,13 @@ Boolean value to enable or disable the OTLP metrics exporter. + [%autowidth,frame=none] |=== -|Optional |Default: grpc +|Optional |Default: http |=== + OTLP protocol to use for pushing metrics. Available options are `grpc`, `http`, or `none` (disabled). +NOTE: gRPC is not supported out of the box. To use it, add the required gRPC and Netty JARs to the `opentelemetry` module's lib directory. + `solr.metrics.otlpExporterInterval`:: + [%autowidth,frame=none] diff --git a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc index e2f3c2bf1067..803a21da56d8 100644 --- a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc +++ b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc @@ -393,9 +393,10 @@ The new OTEL based metric system introduced in 10.0 is considered BETA, and some ==== OTLP protocols The `opentelemetry` module no longer includes some dependencies, dropping gRPC support out-of-the-box. -The default export protocol has changed from `grpc` to `http/protobuf` (OTLP port `4318` instead of `4317`). +The default export protocol for tracing has changed from `grpc` to `http/protobuf` (OTLP port `4318` instead of `4317`). +The default for the separate OTLP metrics exporter's `solr.metrics.otlpExporterProtocol` has likewise changed from `grpc` to `http`. -Use of gRPC can be restored by adding the required gRPC & Netty jars to the `opentelemetry` module's lib directory and setting `OTEL_EXPORTER_OTLP_PROTOCOL=grpc`. +Use of gRPC can be restored by adding the required gRPC & Netty jars to the `opentelemetry` module's lib directory, and setting `OTEL_EXPORTER_OTLP_PROTOCOL=grpc` (tracing) and/or `solr.metrics.otlpExporterProtocol=grpc` (metrics) as needed. ==== OTLP Metric Names Changed to Dot-Separated Format