Skip to content

Commit 34f219f

Browse files
committed
feat: Add elasticsearch instrumentation
1 parent 51d12ba commit 34f219f

11 files changed

Lines changed: 1366 additions & 1 deletion

File tree

.circleci/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ jobs:
173173
environment:
174174
PUBSUB_EMULATOR_HOST: 0.0.0.0:8681
175175
PUBSUB_PROJECT1: test-project,test-topic
176+
- image: docker.elastic.co/elasticsearch/elasticsearch:9.0.0
177+
environment:
178+
discovery.type: single-node
179+
xpack.security.enabled: "false"
180+
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
176181
working_directory: ~/repo
177182
steps:
178183
- checkout

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,7 @@ ENV/
101101
.vscode
102102

103103
# uv (https://docs.astral.sh/uv/)
104-
uv.lock
104+
uv.lock
105+
106+
# Sandbox
107+
sandbox/

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,17 @@ services:
9797
- transaction.state.log.min.isr=1
9898
- --override
9999
- auto.create.topics.enable=true
100+
101+
elasticsearch:
102+
image: docker.elastic.co/elasticsearch/elasticsearch:9.0.0
103+
environment:
104+
- discovery.type=single-node
105+
- xpack.security.enabled=false
106+
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
107+
ports:
108+
- "9200:9200"
109+
healthcheck:
110+
test: ["CMD-SHELL", "curl -sf http://localhost:9200/_cluster/health || exit 1"]
111+
interval: 10s
112+
timeout: 5s
113+
retries: 5

src/instana/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def boot_agent() -> None:
166166
cassandra, # noqa: F401
167167
celery, # noqa: F401
168168
couchbase, # noqa: F401
169+
elasticsearch, # noqa: F401
169170
fastapi, # noqa: F401
170171
flask, # noqa: F401
171172
grpcio, # noqa: F401

0 commit comments

Comments
 (0)