Skip to content

Commit 2bad425

Browse files
authored
SOLR-18110: Remove deprecated attributes for telemetry (#4524)
1 parent 2c8cb32 commit 2bad425

3 files changed

Lines changed: 9 additions & 11 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
2+
title: Remove deprecated http.status_code and http.method telemetry tags from TraceUtils; use http.response.status_code and http.request.method instead.
3+
type: removed
4+
authors:
5+
- name: Utsav Parmar
6+
links:
7+
- name: SOLR-18110
8+
url: https://issues.apache.org/jira/browse/SOLR-18110

solr/core/src/java/org/apache/solr/util/tracing/TraceUtils.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,6 @@ public class TraceUtils {
5959
public static final AttributeKey<List<String>> TAG_OPS = AttributeKey.stringArrayKey("ops");
6060
public static final AttributeKey<String> TAG_CLASS = AttributeKey.stringKey("class");
6161

62-
@Deprecated
63-
private static final AttributeKey<String> TAG_HTTP_METHOD_DEP =
64-
AttributeKey.stringKey("http.method");
65-
66-
@Deprecated
67-
private static final AttributeKey<Long> TAG_HTTP_STATUS_DEP =
68-
AttributeKey.longKey("http.status_code");
69-
7062
public static final String TAG_DB_TYPE_SOLR = "solr";
7163

7264
public static final Predicate<Span> DEFAULT_IS_RECORDING = Span::isRecording;
@@ -103,7 +95,6 @@ public static void setUser(Span span, String user) {
10395

10496
public static void setHttpStatus(Span span, int httpStatus) {
10597
span.setAttribute(TAG_HTTP_STATUS, httpStatus);
106-
span.setAttribute(TAG_HTTP_STATUS_DEP, httpStatus);
10798
}
10899

109100
public static void ifNotNoop(Span span, Consumer<Span> consumer) {
@@ -165,7 +156,6 @@ public static Span startHttpRequestSpan(HttpServletRequest request, Context cont
165156
.setParent(context)
166157
.setSpanKind(SpanKind.SERVER)
167158
.setAttribute(TAG_HTTP_METHOD, request.getMethod())
168-
.setAttribute(TAG_HTTP_METHOD_DEP, request.getMethod())
169159
.setAttribute(TAG_HTTP_URL, request.getRequestURL().toString());
170160
if (request.getQueryString() != null) {
171161
spanBuilder.setAttribute(TAG_HTTP_PARAMS, request.getQueryString());

solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-10.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Attention:
224224
** `analytics` has been removed
225225
** `hadoop-auth` (including the `solr.KerberosPlugin` class) has been removed
226226

227-
* `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`.
227+
* `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)
228228

229229
* The sysProp `-Dsolr.redaction.system.pattern`, which allows users to provide a pattern to match sysProps that should be redacted for sensitive information,
230230
has been removed. Please use `-Dsolr.hiddenSysProps` or the envVar `SOLR_HIDDEN_SYS_PROPS` instead.

0 commit comments

Comments
 (0)