Skip to content
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

Enable oshi ProcessMetrics in javaagent (and refactor oshi instrumentation) #5281

Merged

Conversation

mateuszrzeszutek
Copy link
Member

Fixes #5276

Oshi ProcessMetrics weren't enabled at all in the javaagent - I added them, but guarded behind a otel.instrumentation.oshi.experimental-metrics.enabled config flag. They don't seem to follow any spec so we shouldn't enable them by default; but it makes sense to make them available (optionally) in the javaagent, since they're already available in the library instrumentation.

Also:

  • fixed units in ProcessMetrics
  • extracted common testing module

@mateuszrzeszutek mateuszrzeszutek requested a review from a team as a code owner January 31, 2022 12:56
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracted common testing module

💯

@mateuszrzeszutek mateuszrzeszutek merged commit 3bbc41a into open-telemetry:main Feb 1, 2022
@mateuszrzeszutek mateuszrzeszutek deleted the oshi-process-metrics branch February 1, 2022 08:57
RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
…ation) (open-telemetry#5281)

* Enable oshi ProcessMetrics in javaagent (and refactor oshi instrumentation)

* Get rid of double async instrument registration logs

* spotless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProcessMetrics seems not worked in javaagent default behave, manually instrument works well.
3 participants