-
Notifications
You must be signed in to change notification settings - Fork 828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove LongAdder and ClassValue usages from instrumentation-api #4671
Remove LongAdder and ClassValue usages from instrumentation-api #4671
Conversation
private final LongAdder internal = new LongAdder(); | ||
private final LongAdder consumer = new LongAdder(); | ||
private final LongAdder producer = new LongAdder(); | ||
private final AtomicLong server = new AtomicLong(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think LongAdder
is important in normal code. We should have a wrapper around the two types based on classpath check, and can use @IgnoreJreRequirement
to allow LongAdder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AtomicLong
counters seem acceptable here since they are only used when agent debug is enabled. Not sure whether we'll need our own high-throughput counters in instrumentation, since typically that kind of work will be delegated to the Metrics API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks for pointing that out - agree if only when debug is enabled, AtomicLong is fine
private final LongAdder internal = new LongAdder(); | ||
private final LongAdder consumer = new LongAdder(); | ||
private final LongAdder producer = new LongAdder(); | ||
private final AtomicLong server = new AtomicLong(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AtomicLong
counters seem acceptable here since they are only used when agent debug is enabled. Not sure whether we'll need our own high-throughput counters in instrumentation, since typically that kind of work will be delegated to the Metrics API.
/easycla |
Resolves #4533