opentelemetry-java-contrib icon indicating copy to clipboard operation
opentelemetry-java-contrib copied to clipboard

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

Open robsunday opened this issue 9 months ago • 0 comments

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())

robsunday avatar Feb 10 '25 16:02 robsunday