Skip to content

feat: add support for hbase-client 1.4#19087

Open
YaoYingLong wants to merge 3 commits into
open-telemetry:mainfrom
YaoYingLong:feature/hbase-1.4
Open

feat: add support for hbase-client 1.4#19087
YaoYingLong wants to merge 3 commits into
open-telemetry:mainfrom
YaoYingLong:feature/hbase-1.4

Conversation

@YaoYingLong

Copy link
Copy Markdown
Contributor

Add support for HBase versions [1.4.0, 2.0.0)

Copilot AI review requested due to automatic review settings June 26, 2026 12:45
@YaoYingLong YaoYingLong requested a review from a team as a code owner June 26, 2026 12:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds OpenTelemetry javaagent instrumentation support for hbase-client versions [1.4.0, 2.0.0). To do this it restructures the existing hbase-client-2.0 instrumentation: the module is moved under a new instrumentation/hbase/ parent, and the shared, version-independent pieces (instrumenter factory, request/context model, thread-local state, attributes getter, and the package-private Call accessor helper) are extracted into a new hbase-client-common module so both the 1.4 and 2.0 modules can reuse them. A new hbase-client-1.4 module supplies the 1.x-specific bytecode advice and muzzle range. The shared abstract test is parameterized with hook methods (instrumentationName(), createTable(), putOperation(), getTimeoutClientRetriesNumber()) so each version provides its own table-creation API and expected operation names.

Changes:

  • Extract shared HBase instrumentation logic into a new hbase-client-common (javaagent + testing) module and move hbase-client-2.0 under instrumentation/hbase/.
  • Add a new hbase-client-1.4 javaagent module (instrumentation, muzzle [1.4.0,2.0.0), tests, metadata).
  • Update build wiring, settings.gradle.kts, .fossa.yml, docs/instrumentation-list.yaml, and latest-dep version config to reflect the new module layout.

Reviewed changes

Copilot reviewed 31 out of 34 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
settings.gradle.kts Registers the new hbase modules and removes the old hbase-client-2.0 entries
.../hbase-client-common/testing/.../AbstractHbaseTest.java Parameterizes the shared test with version-specific hooks; switches checkAndMutate to the common API
.../hbase-client-common/testing/build.gradle.kts New testing module build config
.../hbase-client-common/javaagent/.../OpenTelemetryCallUtil.java Updates import to the common RequestAndContext
.../hbase-client-common/javaagent/.../RequestAndContext.java, HbaseRequest.java, HbaseAttributesGetter.java Repackaged into ...client.common
.../hbase-client-common/javaagent/.../HbaseInstrumenterFactory.java, HbaseClientState.java New shared factory and thread-local state holder
.../hbase-client-common/javaagent/build.gradle.kts New common javaagent build config
.../hbase-client-2.0/... (metadata, tests, instrumentation, singletons, module, build) Moved/updated to use the common module
.../hbase-client-1.4/... (metadata, tests, instrumentation, singletons, module, build) New 1.4 instrumentation mirroring the 2.0 pattern
instrumentation/hbase-client-2.0/.../HbaseSingletons.java Old singleton removed (logic split into common)
docs/instrumentation-list.yaml Adds 1.4 entry and fixes 2.0 source path
.github/config/latest-dep-versions.json Adds 1.7.+ latest-dep pins
.fossa.yml Updates FOSSA targets to new module paths

import javax.annotation.Nullable;
import org.apache.hadoop.hbase.TableName;

public final class HbaseClientState {
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.opentelemetry.instrumentation.api.instrumenter.SpanKindExtractor;

public final class HbaseInstrumenterFactory {
@YaoYingLong

Copy link
Copy Markdown
Contributor Author

@laurit Please help fix the code conflicts and review the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants