SOLR-18310: opentelemetry module should not ship Netty JARs#4646
SOLR-18310: opentelemetry module should not ship Netty JARs#4646dsmiley wants to merge 7 commits into
Conversation
…h Maven Central link
epugh
left a comment
There was a problem hiding this comment.
maybe the ticket should change to "opentelementry defaults to http instead of grpc communication"?
I know one of hte dirvers is to eliminate netty from default, but from a suer perspective the bigger end user change is that we are removing grpc protocol from defualt use. I dont' know otel enough to know if this is a issue for our operators of solr or not!
|
|
||
| public static final String OTLP_EXPORTER_PROTOCOL = | ||
| EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "grpc"); | ||
| EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "http"); |
There was a problem hiding this comment.
do we know that http is the default choice in the otel world? I guess in my head I thought grpc for performacne reasons? But I'm not an expert!
There was a problem hiding this comment.
OTLP http/protobuf is widely supported OOTB on recipients AFAICT. I suspect users won't notice this change, but it's not something to withhold from a changelog.
I do expect a there would be a performance difference, albeit not much for a reasonably performant http stack (I think JDK HttpClient is such).
There was a problem hiding this comment.
The default is grpc but I am ok with http.
| title: > | ||
| 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 |
There was a problem hiding this comment.
Not a typical dependency_update usage (isn't an upgrade) but why not use it here.
CC @janhoy
|
|
||
| public static final String OTLP_EXPORTER_PROTOCOL = | ||
| EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "grpc"); | ||
| EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "http"); |
There was a problem hiding this comment.
OTLP http/protobuf is widely supported OOTB on recipients AFAICT. I suspect users won't notice this change, but it's not something to withhold from a changelog.
I do expect a there would be a performance difference, albeit not much for a reasonably performant http stack (I think JDK HttpClient is such).
mlbiscoc
left a comment
There was a problem hiding this comment.
In the metrics-reporting doc there is some parts that still say grpc is default. Those need changes.
Also in OtlpExporterFactory.java if we remove grpc we should more gracefully error if we want users to manually add the jars to use it. Maybe with a try?
|
|
||
| public static final String OTLP_EXPORTER_PROTOCOL = | ||
| EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "grpc"); | ||
| EnvUtils.getProperty("solr.metrics.otlpExporterProtocol", "http"); |
There was a problem hiding this comment.
The default is grpc but I am ok with http.
|
I think the DX is pretty good if someone chooses grpc: java.lang.IllegalStateException: No GrpcSenderProvider found on classpath. Please add dependency on |
|
Sharing a prompt & response with AI with the wider audience here: Context: Historically, metrics and tracing were backed by different mechanisms. Now it's basically all OpenTelemetry. Our documentation and configuration seems too bifurcated nowadays. Of course we still need to discuss metrics separately from tracing, but there's a need IMO for a documentation page just for OTEL, and perhaps configuration too. WDYT? (not acting on this now, just capturing the thought) Agreed — this PR ends up duplicating the same gRPC-JARs caveat in both The deeper wrinkle worth flagging: it's not just docs that are split, the configuration mechanisms are too — tracing goes through real OTEL SDK autoconfigure ( |
https://issues.apache.org/jira/browse/SOLR-18310
(READ THE JIRA)
Implemented with AI of course
I tested with claude using Jaeger to ensure this actually worked. It was useful to uncover a security manager config setting that was needed.