Skip to content

Commit

Permalink
Add refresh policy as attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Shreyansh Ray <rayshrey@amazon.com>
  • Loading branch information
rayshrey committed Oct 18, 2023
1 parent 21fa83b commit a6b4241
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,9 @@ private AttributeNames() {
* Node ID
*/
public static final String NODE_ID = "node_id";

/**
* Refresh Policy
*/
public static final String REFRESH_POLICY = "refresh_policy";
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ private static Attributes buildSpanAttributes(String action, Transport.Connectio
return attributes;
}

<<<<<<< HEAD
/**
* Creates {@link SpanCreationContext} from Inbound Handler.
* @param action action.
Expand All @@ -159,7 +158,8 @@ private static Attributes buildSpanAttributes(String action, TcpChannel tcpChann
private static Attributes buildSpanAttributes(String nodeId, BulkShardRequest bulkShardRequest) {
Attributes attributes = Attributes.create()
.addAttribute(AttributeNames.NODE_ID, nodeId)
.addAttribute(AttributeNames.BULK_REQUEST_ITEMS, bulkShardRequest.items().length);
.addAttribute(AttributeNames.BULK_REQUEST_ITEMS, bulkShardRequest.items().length)
.addAttribute(AttributeNames.REFRESH_POLICY, bulkShardRequest.getRefreshPolicy().getValue());
if (bulkShardRequest.shardId() != null) {
attributes.addAttribute(AttributeNames.INDEX, bulkShardRequest.shardId().getIndexName())
.addAttribute(AttributeNames.SHARD_ID, bulkShardRequest.shardId().getId());
Expand Down

0 comments on commit a6b4241

Please sign in to comment.