Skip to content

Commit

Permalink
Always emit product origin to deprecation log if present (#83115)
Browse files Browse the repository at this point in the history
Prior to this commit, we only emit the product origin to the deprecation log
if there's an opaque ID present. This is very counterintuitive, and probably
not intentional given that it doesn't match the behavior in master.

This commit changes the behavior so that the product origin
will always be included in the deprecation log JSON if it's present in the
context of the request.
  • Loading branch information
gwbrown committed Jan 26, 2022
1 parent 99cc9bf commit a0eb5b6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static Map<String, Object> fieldMap(DeprecationCategory category, String
if (Strings.isNullOrEmpty(xOpaqueId) == false) {
builder.put(X_OPAQUE_ID_FIELD_NAME, xOpaqueId);
}
if (Strings.isNullOrEmpty(xOpaqueId) == false) {
if (Strings.isNullOrEmpty(productOrigin) == false) {
builder.put(ELASTIC_ORIGIN_FIELD_NAME, productOrigin);
}
return builder.immutableMap();
Expand Down

0 comments on commit a0eb5b6

Please sign in to comment.