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

proposal: mapping of stable JVM metrics as top-level attributes #264

Closed
SylvainJuge opened this issue Apr 15, 2024 · 5 comments
Closed

proposal: mapping of stable JVM metrics as top-level attributes #264

SylvainJuge opened this issue Apr 15, 2024 · 5 comments

Comments

@SylvainJuge
Copy link
Member

SylvainJuge commented Apr 15, 2024

Some of the JVM metrics are now stable and are part of the semantic conventions.

For example, the jvm.thread.count metric (semconv)

  • is stored as jvm.thread.count
  • has two attributes which are mapped in labels
    • jvm.thread.daemon stored as labels.jvm_thread_daemon
    • jvm.thread.state stored as labels.jvm_thread_state

In the future, those otel metrics should be mapped as top-level attributes, but a generic solution won't be available short term.

However, we already have the need to build dashboards that rely on those stable metrics (elastic/kibana#174445), which means that whenever we have to rely on the metrics attributes that are mapped in labels.* the dashboards won't be future-proof and will break when those will be mapped as top-level.

For example this will happen with jvm.memory.* metrics as we have to split heap/non-heap memory (semconv spec) and the breakdown is currently stored in labels.jvm_memory_type.

So here the proposal would be to store attributes as top-level attributes, but only limited to the scope of stable JVM metrics as those won't change in the future.

@SylvainJuge
Copy link
Member Author

@elastic/obs-ds-intake-services I'd like to have your input on this idea, as it impacts the implementation choices we make for elastic/kibana#174445

@carsonip
Copy link
Member

SGTM. What's the actual work that's needed for jvm.memory.*? The semconv format is quite different from what we have now e.g. jvm.memory.non_heap.pool.used. Are the dashboards going to query both?

@SylvainJuge
Copy link
Member Author

The metrics names themselves are not translated and are copied as-is, so it's mostly a matter of making sure that the otel attributes are written as top-level fields instead of the labels.jvm.[...].

The current UI implementation is somehow working with the 1.x version of the otel agent that relies on a previous version of the metrics.
We will replace the current UI dashboard with a new one that only relies on the stable metrics.

As a follow-up improvement we could maybe translate the current format used by the 1.x java otel agent to use the new stable definition if there is a direct mapping possible.

@SylvainJuge
Copy link
Member Author

The jvm.memory.non_heap.pool.used is the format used by the Elastic agent, and we don't translate the OTel metrics to this format as far as I know.

@SylvainJuge SylvainJuge changed the title Mapping of stable JVM metrics as top-level attributes proposal: mapping of stable JVM metrics as top-level attributes Jul 2, 2024
@AlexanderWert
Copy link
Member

With the new ingestion path through OTel collector metrics will be mapped in OTel-native way

@AlexanderWert AlexanderWert closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
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

No branches or pull requests

3 participants