You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "gus-asf (via GitHub)" <gi...@apache.org> on 2026/02/06 00:22:48 UTC

[PR] SOLR-18047 Move tracing initialization to TracingFilter [solr]

gus-asf opened a new pull request, #4108:
URL: https://github.com/apache/solr/pull/4108

   https://issues.apache.org/jira/browse/SOLR-18047
   


-- 
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


Re: [PR] SOLR-18047 Move tracing initialization to TracingFilter [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on code in PR #4108:
URL: https://github.com/apache/solr/pull/4108#discussion_r2772164518


##########
solr/core/src/java/org/apache/solr/servlet/TracingFilter.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.solr.servlet;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.context.Context;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpFilter;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import org.apache.solr.logging.MDCLoggingContext;
+import org.apache.solr.util.tracing.TraceUtils;
+
+public class TracingFilter extends HttpFilter {
+
+  @Override
+  public void init(FilterConfig config) throws ServletException {
+    super.init(config);

Review Comment:
   can be removed



##########
solr/core/src/java/org/apache/solr/servlet/TracingFilter.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ */
+
+package org.apache.solr.servlet;
+
+import io.opentelemetry.api.trace.Span;
+import io.opentelemetry.context.Context;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.FilterConfig;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpFilter;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import org.apache.solr.logging.MDCLoggingContext;
+import org.apache.solr.util.tracing.TraceUtils;
+
+public class TracingFilter extends HttpFilter {

Review Comment:
   ```suggestion
   /**
    * Filter for distributed tracing -- creating a span for this request.
    */
   public class TracingFilter extends HttpFilter {
   ```
   
   I wish we had a way to complain about no javadocs on *new* classes



-- 
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


Re: [PR] SOLR-18047 Move tracing initialization to TracingFilter [solr]

Posted by "gus-asf (via GitHub)" <gi...@apache.org>.
gus-asf commented on PR #4108:
URL: https://github.com/apache/solr/pull/4108#issuecomment-3857758314

   I have the changes for the next ticket: SOLR-18048 (moving authentication to filter) already coded and waiting, but it requires this change, so I'm looking to commit this quickly. If anyone wants more time than this weekend to review it, please speak up. 


-- 
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


Re: [PR] SOLR-18047 Move tracing initialization to TracingFilter [solr]

Posted by "gus-asf (via GitHub)" <gi...@apache.org>.
gus-asf merged PR #4108:
URL: https://github.com/apache/solr/pull/4108


-- 
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