-
Notifications
You must be signed in to change notification settings - Fork 133
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
More JFR streaming handlers #644
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
requested review from
breedx-splk,
jack-berg and
kittylyst
December 14, 2022 20:38
Thanks for the submission! Can you submit separate PRs for Garbage collection, memory, buffer, and CPU? There's a lot to review in this and separating by domain will help keep review conversations focussed. |
Yup! I can do that :) |
Closed
This was referenced Dec 15, 2022
trask
pushed a commit
that referenced
this pull request
Jan 3, 2023
**Description:** Add handlers for buffer metrics `process.runtime.jvm.buffer.limit`, `process.runtime.jvm.buffer.count`, and `process.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.
trask
pushed a commit
that referenced
this pull request
Jan 3, 2023
**Description:** This PR adds changes that implement the metric `process.runtime.jvm.gc.duration`. 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. **Testing:** Tests were added but they don't have great coverage. In the future we need to devise a reliable way to test each GC. Currently, I'm not sure of a way to change GCs at runtime in order to test them all. I'm also uncertain of how to reliably force young gen GC and old gen GC. As a result, the test added in this PR basically just invokes "some" GC and ensures that the resulting metric has data that is expected. Co-authored-by: jack-berg <[email protected]>
trask
pushed a commit
that referenced
this pull request
Jan 14, 2023
**Description:** This PR updates the implementation for the metrics `process.runtime.jvm.memory.limit` , `process.runtime.jvm.memory.usage_after_last_gc` , `process.runtime.jvm.memory.committed`, `process.runtime.jvm.memory.init`, `process.runtime.jvm.memory.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 is 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. Some of the attribute key-value pairs outlined [here](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/runtime-metrics/library#garbage-collector-dependent-metrics) are not present with the current implementation. This is because they require additional JFR data, or new events. In the future, when JFR is updated, these handlers should be revisited and updated to cover all the missing attribute key-value pairs.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
These changes add more handlers in an effort to help the JFR streaming implementation meet the semantic conventions defined here.
With the addition of these new changes, the JFR streaming implementation will be as complete as possible with the data emitted by current JFR events. Continuing to make this JFR streaming implementation more complete would require changes to JFR itself in OpenJDK, such as adding new events or adding additional data to existing events.
Testing:
Tests were added in
BufferMetricTest
,GCDurationMetricTest
,MemoryCommittedMetricTest
,MemoryLimitMetricTest
,MemoryInitMetricTest
, andMemoryUsageMetricTest
. Existing tests were also updated where needed.Outstanding items:
A list of changes to OpenJDK JFR in order to help meet the semantic conventions should be compiled. The next step is to contribute the new events/instrumentation to the JDK, then to utilize those changes by updating the handlers in this repo.