Skip to content

Commit

Permalink
[#noissue] Allow blank agentId and ignore it from filter
Browse files Browse the repository at this point in the history
  • Loading branch information
kojandy committed Jan 8, 2025
1 parent bfa1494 commit 5f75a18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.navercorp.pinpoint.common.profiler.util.TransactionId;
import com.navercorp.pinpoint.common.server.bo.SpanBo;
import com.navercorp.pinpoint.common.util.StringUtils;
import com.navercorp.pinpoint.web.controller.BusinessTransactionController;

import java.util.ArrayList;
Expand All @@ -23,7 +22,7 @@ public static Predicate<SpanBo> spanFilter(long spanId, String agentId, long foc
Predicate<SpanBo> filter = SpanFilters.spanIdFilter(spanId);
builder.addFilter(filter);
}
if (StringUtils.hasLength(agentId)) {
if (agentId != null && !agentId.isBlank()) {
Predicate<SpanBo> filter = SpanFilters.agentIdFilter(agentId);
builder.addFilter(filter);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public TransactionInfoViewModel transactionInfo(
@RequestParam(value = "focusTimestamp", required = false, defaultValue = DEFAULT_FOCUS_TIMESTAMP)
@PositiveOrZero
long focusTimestamp,
@RequestParam(value = "agentId", required = false) @NotBlank String agentId,
@RequestParam(value = "agentId", required = false) String agentId,
@RequestParam(value = "spanId", required = false, defaultValue = DEFAULT_SPAN_ID) long spanId,
@RequestParam(value = "v", required = false, defaultValue = "0") int viewVersion,
@RequestParam(value = "useStatisticsAgentState", required = false, defaultValue = "false")
Expand Down

0 comments on commit 5f75a18

Please # to comment.