open-telemetry / open-telemetry/opentelemetry-java-contrib

[jmx-scraper] Add support for Kafka logging metrics in the integration test

Open
#1,726 0 comments 0 reactions 3 assignees View on GitHub

@SylvainJuge is already working on this.

Since Aug 4, 2025.

component:jmx-scraper enhancement
Dominant language
Java
Stars
269
Forks
196
Avg merge
2d 7h
Merged PRs (30d)
38

Description

Related to PR https://github.com/open-telemetry/opentelemetry-java-contrib/pull/1670
Logging related metrics were not generated by default in currently implemented integration tests.

It is necessary to find out the way how to force Kafka to generate these metrics and check them in the integration test.
Metrics should be verified most probably in KafkaIntegrationTest using the following code:

        .add(
            "kafka.logs.flush.count",
            metric ->
                metric
                    .hasDescription("Log flush count")
                    .hasUnit("{flush}")
                    .isCounter()
                    .hasDataPointsWithoutAttributes())
        .add(
            "kafka.logs.flush.time.median",
            metric ->
                metric
                    .hasDescription("Log flush time - 50th percentile")
                    .hasUnit("ms")
                    .isGauge()
                    .hasDataPointsWithoutAttributes())
        .add(
            "kafka.logs.flush.time.99p",
            metric ->
                metric
                    .hasDescription("Log flush time - 99th percentile")
                    .hasUnit("ms")
                    .isGauge()
                    .hasDataPointsWithoutAttributes())

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.