You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/11/09 14:02:43 UTC

[GitHub] [solr] risdenk commented on a diff in pull request #1168: SOLR-16532 New OTEL module with OTLP trace exporter

risdenk commented on code in PR #1168:
URL: https://github.com/apache/solr/pull/1168#discussion_r1017973727


##########
settings.gradle:
##########
@@ -34,6 +34,7 @@ include "solr:server"
 include "solr:modules:analysis-extras"
 include "solr:modules:analytics"
 include "solr:modules:clustering"
+include "solr:modules:otel"

Review Comment:
   I'd prefer the module name to be `opentelemetry`
   
   I think we should use the full name where possible.



##########
solr/modules/otel/README.md:
##########
@@ -0,0 +1,33 @@
+Apache Solr Open Telemetry Tracer
+=====================================
+
+Introduction
+------------
+This module brings support for the new [OTEL](https://opentelemetry.io) standard,
+and exposes a tracer configurator that can be enabled in the
+`<tracerConfig>` tag of `solr.xml`:
+
+```xml
+<tracerConfig name="tracerConfig" class="org.apache.solr.otel.OtelTracerConfigurator" />

Review Comment:
   How about the package and class being: `org.apache.solr.opentelemetry.TracerConfigurator`



##########
solr/modules/otel/build.gradle:
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'java-library'
+
+description = 'Open Telemetry (OTEL) tracer'
+
+dependencies {
+  implementation project(':solr:core')
+
+  // TODO: Prune down dependencies to the absolute necessary
+
+  implementation platform('io.opentelemetry:opentelemetry-bom')
+  implementation platform('io.opentelemetry:opentelemetry-bom-alpha')
+
+//  implementation 'io.opentelemetry:opentelemetry-sdk-common'
+  implementation 'io.opentelemetry:opentelemetry-sdk-trace'
+  implementation 'io.opentelemetry:opentelemetry-sdk-extension-autoconfigure'
+  implementation 'io.opentelemetry:opentelemetry-opentracing-shim'
+  implementation 'io.opentelemetry:opentelemetry-semconv'
+  implementation 'io.opentelemetry:opentelemetry-exporter-otlp-trace:1.14.0'
+  implementation 'io.opentelemetry:opentelemetry-exporter-jaeger'
+  implementation 'io.opentelemetry:opentelemetry-exporter-zipkin'
+
+  // GRPC transport via netty - since we already ship netty this is cheaper than netty-shaded
+  runtimeOnly 'io.grpc:grpc-netty'
+  implementation 'io.grpc:grpc-protobuf'
+  implementation 'io.grpc:grpc-stub'
+  implementation 'io.grpc:grpc-context'

Review Comment:
   Do we need these `grpc` dependencies? I don't see them in any of our code? If we can remove them we don't need the `grpc` version in `versions.props` either.



##########
solr/modules/otel/build.gradle:
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'java-library'
+
+description = 'Open Telemetry (OTEL) tracer'
+
+dependencies {
+  implementation project(':solr:core')
+
+  // TODO: Prune down dependencies to the absolute necessary
+
+  implementation platform('io.opentelemetry:opentelemetry-bom')
+  implementation platform('io.opentelemetry:opentelemetry-bom-alpha')

Review Comment:
   Seems weird to need both bom and bom-alpha



##########
solr/modules/otel/README.md:
##########
@@ -0,0 +1,33 @@
+Apache Solr Open Telemetry Tracer
+=====================================
+
+Introduction
+------------
+This module brings support for the new [OTEL](https://opentelemetry.io) standard,
+and exposes a tracer configurator that can be enabled in the
+`<tracerConfig>` tag of `solr.xml`:
+
+```xml
+<tracerConfig name="tracerConfig" class="org.apache.solr.otel.OtelTracerConfigurator" />
+```
+
+The tracer can be configured with environment variables, see https://opentelemetry.io/docs/concepts/sdk-configuration/otlp-exporter-configuration/ and users can change both the exprter, trace propagator and many other settings.
+
+The defaults are: 
+
+```
+OTEL_SDK_DISABLED=false

Review Comment:
   I think I'd prefer `OPENTELEMETRY_...` but it is a bit longer. It does make it 100% clear what this is for.



##########
solr/modules/otel/build.gradle:
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+apply plugin: 'java-library'
+
+description = 'Open Telemetry (OTEL) tracer'
+
+dependencies {
+  implementation project(':solr:core')
+
+  // TODO: Prune down dependencies to the absolute necessary
+
+  implementation platform('io.opentelemetry:opentelemetry-bom')
+  implementation platform('io.opentelemetry:opentelemetry-bom-alpha')
+
+//  implementation 'io.opentelemetry:opentelemetry-sdk-common'
+  implementation 'io.opentelemetry:opentelemetry-sdk-trace'
+  implementation 'io.opentelemetry:opentelemetry-sdk-extension-autoconfigure'
+  implementation 'io.opentelemetry:opentelemetry-opentracing-shim'
+  implementation 'io.opentelemetry:opentelemetry-semconv'
+  implementation 'io.opentelemetry:opentelemetry-exporter-otlp-trace:1.14.0'
+  implementation 'io.opentelemetry:opentelemetry-exporter-jaeger'
+  implementation 'io.opentelemetry:opentelemetry-exporter-zipkin'
+
+  // GRPC transport via netty - since we already ship netty this is cheaper than netty-shaded
+  runtimeOnly 'io.grpc:grpc-netty'
+  implementation 'io.grpc:grpc-protobuf'
+  implementation 'io.grpc:grpc-stub'
+  implementation 'io.grpc:grpc-context'
+  compileOnly 'org.apache.tomcat:annotations-api'

Review Comment:
   Can you add a comment like:
   
   ```
   // See https://issues.apache.org/jira/browse/LOG4J2-3609 due to needing these annotations
   ```
   
   since my guess is LOG4J2-3609 is why we need this compileOnly annotation.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org