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

Add support for OTel Java runtime metrics #19

Merged
merged 24 commits into from
Apr 12, 2023

Conversation

liustanley
Copy link
Contributor

@liustanley liustanley commented Mar 3, 2023

What does this PR do?

  • Moves runtime metric mappings into separate file
  • Adds mappings for Java runtime metrics
  • Removes metricType field from runtimeMetricMapping, changes code to use incoming metric type instead
  • Refactors runtime metric attributes to support metrics that map from multiple attributes
  • Changes mapping code to remove attributes that were used in the mapping process (i.e. when jvm.heap_memory is mapped, it doesn't copy the "type=heap" attribute from the OTel metric)
  • Support mapping histogram runtime metrics

@liustanley liustanley requested a review from a team as a code owner March 3, 2023 19:27
@liustanley liustanley requested a review from dineshg13 March 3, 2023 19:27
@liustanley liustanley requested a review from dineshg13 March 6, 2023 16:48
Copy link
Member

@dineshg13 dineshg13 left a comment

Choose a reason for hiding this comment

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

@liustanley liustanley requested a review from dineshg13 April 4, 2023 19:47
Copy link
Member

@dineshg13 dineshg13 left a comment

Choose a reason for hiding this comment

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

Looks good. Added a small comment

@liustanley liustanley merged commit 8781a60 into main Apr 12, 2023
@liustanley liustanley deleted the stanley.liu/otel-java-runtime-metrics branch April 12, 2023 20:14
@sirianni
Copy link

sirianni commented Nov 16, 2023

The aliasing of process.runtime.jvm.gc.duration to jvm.gc.parnew.time breaks setups that have both legacy Java apps using JMX and new Java applications using OTel due to an incompatibility in metric type (distribution vs. gauge).

In these scenarios, the jvm.gc.parnew.time metric metadata on the Datadog backend gets changed from a gauge to a distribution which causes the JMX-fetched gauge variant of jvm.gc.parnew.time to be completely unqueryable (disappears from all dashboards and monitors).

CC @mx-psi

@mx-psi
Copy link
Member

mx-psi commented Nov 16, 2023

@sirianni can you file a support ticket for this? Please share the case number here and I can loop in the relevant people :)

@sirianni
Copy link

Please share the case number here and I can loop in the relevant people :)

https://help.datadoghq.com/hc/en-us/requests/1434627

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.

4 participants