Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Use subheadings with the "=====" level for adding notes for unreleased changes:
[float]
===== Bug fixes
* Fixed edge case where inferred spans could cause cycles in the trace parent-child relationships, subsequently resulting in the UI crashing - {pull}3588[#3588]
* Fix NPE in dropped spans statistics - {pull}3590[#3590]

[[release-notes-1.x]]
=== Java Agent version 1.x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,13 @@ public void captureDroppedSpan(Span span) {
private Stats getOrCreateStats(ServiceTarget serviceTarget, Outcome outcome) {
StatsKey statsKey = statsKeyObjectPool.createInstance().init(serviceTarget, outcome);
Stats stats = statsMap.get(statsKey);
if (stats != null || statsMap.size() > 127) {
if (stats != null) {
statsKeyObjectPool.recycle(statsKey);
return stats;
}
if (statsMap.size() > 127) {
statsKeyObjectPool.recycle(statsKey);
}

stats = statsObjectPool.createInstance();

Expand Down