Add Cassandra compaction progress metrics via JMX handler#19290
Open
jkoronaAtCisco wants to merge 2 commits into
Open
Add Cassandra compaction progress metrics via JMX handler#19290jkoronaAtCisco wants to merge 2 commits into
jkoronaAtCisco wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Cassandra in-flight compaction byte-progress metrics to the experimental JMX target system.
Changes:
- Implements and registers a code-based Cassandra compaction handler.
- Adds unit and container integration coverage.
- Documents the new gauges and attributes.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
CHANGELOG.md |
Adds an enhancement entry. |
instrumentation/jmx-metrics/library/cassandra.md |
Documents the new metrics. |
.../CassandraCompactionProgressHandler.java |
Queries, groups, and records compaction progress. |
.../ExperimentalJmxMetricHandler |
Registers the handler through SPI. |
.../experimental-cassandra.yaml |
Activates the handler for CompactionManager. |
.../CassandraCompactionProgressHandlerTest.java |
Tests parsing, filtering, and grouping. |
.../CassandraTest.java |
Exercises metrics against Cassandra. |
| return 0; | ||
| } | ||
| try { | ||
| return new BigInteger(value.toString()).longValue(); |
Pull request dashboard statusStatus last refreshed: 2026-07-22 00:43:02 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, report it with the result you expected. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two Cassandra compaction byte-progress metrics to the
experimental-cassandraJMX target system, implemented as a code-basedExperimentalJmxMetricHandlerbecause the source data can't be expressed in declarative YAML.Both carry
cassandra.compaction.task_type,cassandra.keyspace, andcassandra.tableattributes.These come from
org.apache.cassandra.db:type=CompactionManager'sCompactionsattribute, which returns a list of maps (one per in-flight compaction). Producing the metrics requires iterating that list, grouping entries by the composite key, filtering to byte-measured compactions, and parsing string-encodedBigIntegervalues — none of which the YAML rule syntax supports.This builds on the
experimental-cassandratarget system added in #19080, and supersedes the handler portion of open-telemetry/opentelemetry-java-contrib#2912, which prototyped these metrics in jmx-scraper; that contrib PR will be closed once this lands.