Skip to content

Replace WeakConcurrentMaps with SpanConcurrentHashMaps #2092

@eyalkoren

Description

@eyalkoren

What is this about?

Switching to SpanConcurrentHashMap wherever applicable has two major benefits:

  1. reference counting is enforced and maintained centrally, ensuring spans are not recycled ahead of time and still being referenced, therefore potentially used
  2. in combination with our MockReporter recycling assertions, this enables us locating places where spans/transactions are not actively removed from WeakConcurrentMaps, thus relying on GC to clear them away. By reducing those to a minimum, we can dramatically decrease the number of WeakReferences that are "active" at any given moment, thus considerably reduce GC-related overhead.

Plugin Checklist

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions