Apache Solr open-source search software
SOLR-16205: Simplify v2 API span-population logic (#873)
Jason Gerlowskic38ef272d7bc
diff --git a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java b/solr/core/src/java/org/apache/solr/api/V2HttpCall.javaindex a652c1b246c..8d1a2e7a0fd 100644--- a/solr/core/src/java/org/apache/solr/api/V2HttpCall.java+++ b/solr/core/src/java/org/apache/solr/api/V2HttpCall.java@@ -423,13 +423,7 @@ public class V2HttpCall extends HttpSolrCall {}// Get the templatize-ed path, ex: "/c/{collection}"- String path;- if (api instanceof AnnotatedApi) {- // ideal scenario; eventually everything might be AnnotatedApi?- path = ((AnnotatedApi) api).getEndPoint().path()[0]; // consider first to be primary- } else {- path = computeEndpointPath();- }+ final String path = computeEndpointPath();String verb = null;// if this api has commands ...diff --git a/solr/core/src/test/org/apache/solr/util/tracing/TestDistributedTracing.java b/solr/core/src/test/org/apache/solr/util/tracing/TestDistributedTracing.javaindex d4b8c232b46..624c9d162ef 100644--- a/solr/core/src/test/org/apache/solr/util/tracing/TestDistributedTracing.java+++ b/solr/core/src/test/org/apache/solr/util/tracing/TestDistributedTracing.java@@ -152,12 +152,7 @@ public class TestDistributedTracing extends SolrCloudTestCase {.build().process(cloudClient);finishedSpans = getAndClearSpans();- // TODO See SOLR-16205. A quirk in the way that span operationNames are generated causes- // core-level v2 endpoints- // implemented using AnnotatedApi to produce spans lacking the full url (ie.- // /c/{collection}/update/json). This test- // will need updated to assert against the "full url" when SOLR-16205 is fixed.- assertEquals("post:/update/json", finishedSpans.get(0).operationName());+ assertEquals("post:/c/{collection}/update/json", finishedSpans.get(0).operationName());assertDbInstanceColl(finishedSpans.get(0));final V2Response v2Response =