Skip to content

jmx metrics provide registry + weaver validation #19227

Description

@SylvainJuge

As described in the discussion of #16016

  • instrumentation should only produce stable metrics by default, users should be able to opt-in for other metrics.
  • JMX metrics are not formally defined nor have stability definition
  • some of the target systems do have experimental- prefix to indicate their definitions are not stable
    • this creates breaking changes for users when metrics are promoted
    • this prevent promoting metrics one by one, it's all or nothing
  • users have to know the relevant values to use for otel.jmx.target.system in order to get the metrics, whereas the presence of MBeans should be enough to know if a given system needs to be monitored.

In order to solve this, we need to have the following:

  • a formal definition of JMX metrics that is consistent with upstream semantic conventions, it should be compatible with the "federated semconv" to be reusable/imported by end users
  • having the ability to select JMX metrics on their stability level, rather than having to enumerate the "target system", in other words: "capture what is available in the JMX tree for a given maturity level".
    • doing this automatic discovery is not strictly required here but allows to remove the need to define and maintain the values for otel.jmx.target.system.

Once this is complete we should have:

  • otel.jmx.target.system configuration option is optional or deprecated
  • added the ability to select JMX metrics on their stability level, the default should be stable.
  • a folder in this repository that contains reusable definitions of existing JMX metrics and can be used with a "federated semconv" strategy
  • the ability to start formally promoting some of those JMX metrics as stable.

Relates to

Implementation steps

Follow-up step(s)

  • optional: promotion of JMX metrics to stable
  • required: ensure feature parity in jmx-scraper

Optional but related step(s)

  • optional: automate generation of JMX metrics documentation from registry
  • optional: reduce duplication between JMX metrics tests and weaver validation (instrument type, unit, metric description), some aspects are not covered by weaver like assert on numeric value or attribute value.
  • optional: reduce duplication in metrics definition yaml, either through weaver generation (with annotations), or by providing a way to link to JMX metrics registry definitions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions