Skip to content

Deprecate elasticsearch-rest-7.0 library instrumentation and collapse elasticsearch-rest-common-5.0 to javaagent-only #19697

Description

@trask

Is your feature request related to a problem? Please describe.

elasticsearch-rest-7.0/library was added in July 2023 (#8867#8911) as a stopgap for users on elasticsearch-java who were waiting for native OpenTelemetry in the client. That landed about two months later, in 8.10 and 7.17.20.

It is expensive for what it does. It builds a ByteBuddy subclass of a concrete RestClient at runtime, discovers a constructor by matching parameter shapes, injects the generated class into Elastic's class loader, plants a RestClientPackageAccess shim inside org.elasticsearch.client, and routes every call through reflection.

It is also the only non-javaagent consumer of elasticsearch-rest-common-5.0/library. That module is published as opentelemetry-elasticsearch-rest-common-5.0 even though every class in it is internal.

Describe the solution you'd like

Two steps.

  1. Deprecate elasticsearch-rest-7.0/library and point users at the client's own native instrumentation.
  2. Once that removes its only non-javaagent consumer, collapse elasticsearch-rest-common-5.0 to javaagent-only.

Additional context

#19675 is adding query text sanitization only for elasticsearch javaagent instrumentation because it requires having access to a json parser.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestneeds triageNew issue that requires triage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions