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.
- Deprecate
elasticsearch-rest-7.0/library and point users at the client's own native instrumentation.
- 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.
Is your feature request related to a problem? Please describe.
elasticsearch-rest-7.0/librarywas added in July 2023 (#8867 → #8911) as a stopgap for users onelasticsearch-javawho 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
RestClientat runtime, discovers a constructor by matching parameter shapes, injects the generated class into Elastic's class loader, plants aRestClientPackageAccessshim insideorg.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 asopentelemetry-elasticsearch-rest-common-5.0even though every class in it isinternal.Describe the solution you'd like
Two steps.
elasticsearch-rest-7.0/libraryand point users at the client's own native instrumentation.elasticsearch-rest-common-5.0to javaagent-only.Additional context
#19675 is adding query text sanitization only for elasticsearch javaagent instrumentation because it requires having access to a json parser.