This is an automated email from the ASF dual-hosted git repository.
dsmiley pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 1e8116145fa SOLR-18310: opentelemetry: switch default from gRPC to
http/protobuf(#4646)
1e8116145fa is described below
commit 1e8116145faca028b08ac129fdf83e2d82091822
Author: David Smiley <[email protected]>
AuthorDate: Thu Jul 23 11:09:49 2026 -0400
SOLR-18310: opentelemetry: switch default from gRPC to http/protobuf(#4646)
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. This reduces Netty JARs, for example.
Affects metrics & tracing.
Co-authored-by: copilot-swe-agent[bot]
<[email protected]>
---
.../unreleased/SOLR-18310-otel-jdk-sender.yml | 9 +++++++
gradle/libs.versions.toml | 1 +
.../solr/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 -
...entelemetry-exporter-sender-jdk-1.56.0.jar.sha1 | 1 +
...elemetry-exporter-sender-okhttp-1.56.0.jar.sha1 | 1 -
.../proto-google-common-protos-2.64.1.jar.sha1 | 1 -
solr/modules/opentelemetry/build.gradle | 16 +++++--------
solr/modules/opentelemetry/gradle.lockfile | 28 ++--------------------
.../solr/opentelemetry/OtelTracerConfigurator.java | 2 +-
solr/server/etc/security.policy | 3 +++
.../pages/distributed-tracing.adoc | 23 +++++++++++-------
.../deployment-guide/pages/metrics-reporting.adoc | 6 +++--
.../pages/major-changes-in-solr-10.adoc | 8 +++++++
18 files changed, 52 insertions(+), 78 deletions(-)
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 00000000000..93a8000d999
--- /dev/null
+++ b/changelog/unreleased/SOLR-18310-otel-jdk-sender.yml
@@ -0,0 +1,9 @@
+title: >
+ 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
+links:
+ - name: SOLR-18310
+ url: https://issues.apache.org/jira/browse/SOLR-18310
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index ad0aa4db610..fe7d4d6d756 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -487,6 +487,7 @@ opentelemetry-bom = { module =
"io.opentelemetry:opentelemetry-bom", version.ref
opentelemetry-context = { module = "io.opentelemetry:opentelemetry-context",
version.ref = "opentelemetry" }
opentelemetry-exporter-otlp = { module =
"io.opentelemetry:opentelemetry-exporter-otlp", 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" }
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 d0ac8219aa3..e6f1f24e85c 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 829aa69a750..80f332fc2bd 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 ad9bc971add..00000000000
--- 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 68fe44b7d9b..00000000000
--- 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 6adae698680..00000000000
--- 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 cdf1b264bb2..00000000000
--- 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 00000000000..4b0746ab0c9
--- /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 7aaf975e4de..00000000000
--- 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 371f2bdcaaa..00000000000
--- 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 b14d3868e41..49877fbcd93 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,13 @@ dependencies {
implementation libs.opentelemetry.sdk
implementation libs.opentelemetry.sdk.metrics
implementation libs.opentelemetry.sdk.extension.autoconfigure
- implementation libs.opentelemetry.exporter.otlp
- // End users must recompile with jaeger exporter and/or zipkin exporter if
they need these
+ implementation(libs.opentelemetry.exporter.otlp) {
+ // Exclude the OkHttp-based sender; we use the JDK HTTP sender instead
+ exclude group: 'io.opentelemetry', module:
'opentelemetry-exporter-sender-okhttp'
+ }
- // 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
+ // 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/modules/opentelemetry/gradle.lockfile
b/solr/modules/opentelemetry/gradle.lockfile
index 02eab7c04c6..38d77475626 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 c70acee63c2..ae1aa625991 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 @@ public class OtelTracerConfigurator extends
OpenTelemetryConfigurator {
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/server/etc/security.policy b/solr/server/etc/security.policy
index f932cc0b461..2dd03af0be2 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 fb4cdb050cc..fb60329ee03 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/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 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:
@@ -39,7 +42,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:
@@ -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 `<tracerConfig>` 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 `<tracerConfig>` in `solr.xml` as follows:
[source,xml]
----
@@ -70,24 +74,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, 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:
[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 +103,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/deployment-guide/pages/metrics-reporting.adoc
b/solr/solr-ref-guide/modules/deployment-guide/pages/metrics-reporting.adoc
index 15a2d592f87..adab8021580 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 762c5e440d8..803a21da56d 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,14 @@ 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.
+==== OTLP protocols
+
+The `opentelemetry` module no longer includes some dependencies, dropping gRPC
support out-of-the-box.
+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` (tracing) and/or
`solr.metrics.otlpExporterProtocol=grpc` (metrics) as needed.
+
==== OTLP Metric Names Changed to Dot-Separated Format
*Breaking change for OTLP consumers.*