Add docs for experimental-cassandra target system for jmx-scraper - #3091
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new Cassandra integration test is likely to be flaky without an explicit readiness wait before executing cqlsh/nodetool against the freshly started container.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an experimental-cassandra target system option for the JMX scraper that relies on Cassandra metric rules shipped in the upstream instrumentation JAR, and introduces an integration test that exercises both the aligned rule set and the compaction-progress handler.
Changes:
- Add
ExperimentalCassandraIntegrationTestto validateexperimental-cassandrausingotel.jmx.target.system.source=instrumentation. - Update
jmx-scraper/README.mdto list the new target system and link to the upstream rule file/doc. - Update
CHANGELOG.mdto record the addition under JMX Scraper.
File summaries
| File | Description |
|---|---|
| jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/target_systems/ExperimentalCassandraIntegrationTest.java | New end-to-end integration test for experimental-cassandra, including compaction-progress validation. |
| jmx-scraper/README.md | Documents experimental-cassandra as a supported target system referencing upstream rules. |
| CHANGELOG.md | Adds an Unreleased changelog entry for the new target system. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| private static void seedCompactionData(GenericContainer<?> target) { | ||
| try { | ||
| nodetool(target, "setcompactionthroughput", "1"); | ||
|
|
||
| execOrThrow( |
| import java.util.logging.Logger; | ||
| import org.testcontainers.containers.Container; | ||
| import org.testcontainers.containers.GenericContainer; | ||
| import org.testcontainers.containers.wait.strategy.Wait; |
| private static final int CASSANDRA_PORT = 9042; | ||
| private static final String NODETOOL_JMX_PORT = "9999"; | ||
|
|
|
I don't think we need to explicitly test Also, with open-telemetry/opentelemetry-java-instrumentation#19783 the Anyway, we can still document the current |
Good point, I removed the test.
Thanks @SylvainJuge, I wasn't aware of that effort. |
Description:
Adds docs info about
experimental-cassandraas a target system for the JMX scraper, inheriting the aligned Cassandra metric definitions from instrumentation rather than the legacy definitions embedded in jmx-scraper.This completes the downstream half of the Cassandra JMX alignment: the definitions and the code-based compaction-progress handler were added upstream in opentelemetry-java-instrumentation #19080 and #19290, and shipped in the 2.31.1-alpha release that this repo now pins. Selecting
experimental-cassandraresolvesjmx/rules/experimental-cassandra.yamldirectly from the instrumentation library jar — no local definitions are added here.