open-telemetry / open-telemetry/opentelemetry-java-instrumentation

declarative config: support for jmx metrics

Open
#14,916 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
2.6k
Forks
1.2k
Avg merge
2d 18h
Merged PRs (30d)
228

Description

The JMX metrics are captured with the JMX Insights component in instrumentation,
the metrics are defined in a YAML format.

Users can extend the provided metrics definitions by providing their own YAML files through the otel.jmx.config configuration option.

Those extra YAML configuration files are provided and managed by the end-user.

With the declarative configuration, we can configure the path to this custom metrics definitions.

However, it could also be interesting to nest the metrics definitions directly into the declarative configuration, hence allowing to configure everything with a single (but large) YAML file.

Doing so could help with the following use-cases:

  • configure everything with a single file
  • alternative to fetch the metrics definitions from a central remote location (config would be "pushed" instead of "pulled"), see #12775

There are however a few technical challenges:

  • the current implementation relies on parsing directly the yaml file (but with the same parser library).
  • we need to have an API/SPI that allows to delegate the parsing of declarative config to the JMX Insights component

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the instrumentation/jmx-metrics component and its otel.jmx.config configuration-file handling. Review the declarative configuration approach and the related pull request #12775, then determine the API/SPI boundary needed for JMX Insights to consume nested metric definitions. Done means declarative configuration can express these definitions without requiring separate user-managed YAML files.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, yaml
Domain
developer-experience, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.