Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-18110: Remove deprecated attributes for telemetry (#4524)

Utsav2bad42532ebb
diff --git a/changelog/unreleased/SOLR-18110-remove-deprecated-tracing-attributes.yml b/changelog/unreleased/SOLR-18110-remove-deprecated-tracing-attributes.yml
new file mode 100644
index 00000000000..04b040d7efa
--- /dev/null
+++ b/changelog/unreleased/SOLR-18110-remove-deprecated-tracing-attributes.yml
@@ -0,0 +1,8 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+title: Remove deprecated http.status_code and http.method telemetry tags from TraceUtils; use http.response.status_code and http.request.method instead.
+type: removed
+authors:
+ - name: Utsav Parmar
+links:
+ - name: SOLR-18110
+ url: https://issues.apache.org/jira/browse/SOLR-18110
diff --git a/solr/core/src/java/org/apache/solr/util/tracing/TraceUtils.java b/solr/core/src/java/org/apache/solr/util/tracing/TraceUtils.java
index 9936dfbb232..b907e35fb4a 100644
--- a/solr/core/src/java/org/apache/solr/util/tracing/TraceUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/tracing/TraceUtils.java
@@ -59,14 +59,6 @@ public class TraceUtils {
public static final AttributeKey<List<String>> TAG_OPS = AttributeKey.stringArrayKey("ops");
public static final AttributeKey<String> TAG_CLASS = AttributeKey.stringKey("class");
- @Deprecated
- private static final AttributeKey<String> TAG_HTTP_METHOD_DEP =
- AttributeKey.stringKey("http.method");
-
- @Deprecated
- private static final AttributeKey<Long> TAG_HTTP_STATUS_DEP =
- AttributeKey.longKey("http.status_code");
-
public static final String TAG_DB_TYPE_SOLR = "solr";
public static final Predicate<Span> DEFAULT_IS_RECORDING = Span::isRecording;
@@ -103,7 +95,6 @@ public class TraceUtils {
public static void setHttpStatus(Span span, int httpStatus) {
span.setAttribute(TAG_HTTP_STATUS, httpStatus);
- span.setAttribute(TAG_HTTP_STATUS_DEP, httpStatus);
}
public static void ifNotNoop(Span span, Consumer<Span> consumer) {
@@ -165,7 +156,6 @@ public class TraceUtils {
.setParent(context)
.setSpanKind(SpanKind.SERVER)
.setAttribute(TAG_HTTP_METHOD, request.getMethod())
- .setAttribute(TAG_HTTP_METHOD_DEP, request.getMethod())
.setAttribute(TAG_HTTP_URL, request.getRequestURL().toString());
if (request.getQueryString() != null) {
spanBuilder.setAttribute(TAG_HTTP_PARAMS, request.getQueryString());
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 627816636c5..d05081d297f 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
@@ -224,7 +224,7 @@ Attention:
** `analytics` has been removed
** `hadoop-auth` (including the `solr.KerberosPlugin` class) has been removed
-* `OpenTracing` libraries were removed and replaced with `OpenTelemetry` libraries. Any Java agents providing `OpenTracing` tracers will no longer work. Telemetry tags `http.status_code` and `http.method` have been deprecated, newer versions of the tags have been added to the span data: `http.response.status_code`, `http.request.method`.
+* `OpenTracing` libraries were removed and replaced with `OpenTelemetry` libraries. Any Java agents providing `OpenTracing` tracers will no longer work. Telemetry tags `http.status_code` and `http.method` have been removed from the span data; use `http.response.status_code` and `http.request.method` instead. (SOLR-18110)
* The sysProp `-Dsolr.redaction.system.pattern`, which allows users to provide a pattern to match sysProps that should be redacted for sensitive information,
has been removed. Please use `-Dsolr.hiddenSysProps` or the envVar `SOLR_HIDDEN_SYS_PROPS` instead.