Skip to content

Commit e0b7d2b

Browse files
committed
* search: remove opentelemetry dependency from es lib
Signed-off-by: neo <[email protected]>
1 parent f840526 commit e0b7d2b

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Change log
22

3+
### 9.1.9 (4/24/2025 - )
4+
5+
* search: remove opentelemetry dependency from es lib
6+
37
### 9.1.8 (3/7/2025 - 4/24/2025)
48

59
* sse: removed default rate limit group ServerSentEventConfig.SSE_CONNECT_GROUP ("sse:connect")

build.gradle.kts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ apply(plugin = "project")
77

88
subprojects {
99
group = "core.framework"
10-
version = "9.1.8"
10+
version = "9.1.9"
1111
}
1212

1313
val elasticVersion = "8.15.0"
@@ -32,7 +32,9 @@ project("core-ng") {
3232
implementation("com.squareup.okio:okio:3.2.0") // okio 3.3.0 has synchronization issue with virtual thread
3333
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.0.20")
3434
implementation("io.undertow:undertow-core:2.3.18.Final")
35-
implementation("org.apache.kafka:kafka-clients:4.0.0")
35+
implementation("org.apache.kafka:kafka-clients:4.0.0") {
36+
exclude("org.xerial.snappy")
37+
}
3638
compileOnly("org.jboss.logging:jboss-logging-annotations:2.2.1.Final")
3739
compileOnly("com.github.spotbugs:spotbugs-annotations:4.8.3")
3840
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
@@ -79,7 +81,9 @@ project("core-ng-search") {
7981
apply(plugin = "lib")
8082
dependencies {
8183
api(project(":core-ng"))
82-
api("co.elastic.clients:elasticsearch-java:${elasticVersion}")
84+
api("co.elastic.clients:elasticsearch-java:${elasticVersion}") {
85+
exclude(group = "io.opentelemetry")
86+
}
8387
implementation("com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}")
8488
testImplementation(project(":core-ng-test"))
8589
}
@@ -90,7 +94,9 @@ project("core-ng-search-test") {
9094
dependencies {
9195
implementation(project(":core-ng-test"))
9296
implementation(project(":core-ng-search"))
93-
implementation("org.elasticsearch:elasticsearch:${elasticVersion}")
97+
implementation("org.elasticsearch:elasticsearch:${elasticVersion}") {
98+
exclude(group = "io.opentelemetry")
99+
}
94100
implementation("org.elasticsearch.plugin:transport-netty4:${elasticVersion}")
95101
implementation("org.codelibs.elasticsearch.module:mapper-extras:${elasticVersion}") // used by elasticsearch scaled_float
96102
implementation("org.codelibs.elasticsearch.module:lang-painless:${elasticVersion}")

core-ng-search/src/main/java/core/framework/search/impl/ElasticSearchImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import co.elastic.clients.elasticsearch.indices.ElasticsearchIndicesClient;
77
import co.elastic.clients.json.JsonData;
88
import co.elastic.clients.json.jackson.JacksonJsonpMapper;
9+
import co.elastic.clients.transport.instrumentation.NoopInstrumentation;
910
import co.elastic.clients.transport.rest_client.RestClientTransport;
1011
import com.fasterxml.jackson.annotation.JsonInclude;
1112
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -64,7 +65,7 @@ public void initialize() {
6465
.addInterceptorFirst(new ElasticSearchLogInterceptor()));
6566
restClient = builder.build();
6667
mapper = JSONMapper.builder().serializationInclusion(JsonInclude.Include.NON_NULL).build();
67-
client = new ElasticsearchClient(new RestClientTransport(restClient, new JacksonJsonpMapper(mapper)));
68+
client = new ElasticsearchClient(new RestClientTransport(restClient, new JacksonJsonpMapper(mapper), null, NoopInstrumentation.INSTANCE));
6869
}
6970
}
7071

docker/es/docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
elasticsearch:
3-
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.0
3+
image: docker.elastic.co/elasticsearch/elasticsearch:9.0.0
44
volumes:
55
- ./log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties
66
ports:
@@ -15,7 +15,7 @@ services:
1515
- xpack.ml.enabled=false
1616
- ingest.geoip.downloader.enabled=false
1717
kibana:
18-
image: docker.elastic.co/kibana/kibana:8.17.0
18+
image: docker.elastic.co/kibana/kibana:9.0.0
1919
ports:
2020
- 5601:5601
2121
environment:
@@ -29,6 +29,5 @@ services:
2929
- XPACK_APM_UI_ENABLED=false
3030
- XPACK_FLEET_AGENTS_ENABLED=false
3131
- XPACK_REPORTING_ENABLED=false
32-
- XPACK_REPORTING_ROLES_ENABLED=false
3332
depends_on:
3433
- elasticsearch

0 commit comments

Comments
 (0)