-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add buffer handlers and implement buffer metrics #650
Conversation
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.
Just a few minor comments. Thanks!
...java/io/opentelemetry/contrib/jfr/metrics/internal/buffer/DirectBufferStatisticsHandler.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public Optional<Duration> getPollingDuration() { | ||
return Optional.of(Duration.ofSeconds(1)); |
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.
What's the significance of the polling duration? Why 1s vs. 5s, 10s, etc?
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.
The JFR streaming system flushes the in memory JFR buffers holding event data to the disk repo at 1s intervals, at which point they may be consumed by the handlers. So polling at 1s intervals should provide the most up to date data without adding unnecessary overhead.
Description:
Add handlers for buffer metrics
process.runtime.jvm.buffer.limit
,process.runtime.jvm.buffer.count
, andprocess.runtime.jvm.buffer.usage
.This was a part of a larger PR here: #644.
jfr-streaming/src/main/java/io/opentelemetry/contrib/jfr/metrics/internal/Constants.java
has been kept the same as it was in the larger PR because it's used in all of the smaller constituent PRs. This will hopefully also avoid some conflicts as the PRs are sequentially merged. As a result, there are some constants that are defined, but not used in this PR.