@@ -22,8 +22,9 @@ Copy [env.example](env.example) to `.env` and fill in values noted inside.
2222## Installing and connecting to Elasticsearch
2323
2424There are a number of ways to install Elasticsearch. Cloud is best for most
25- use-cases. We also have [ docker-compose-elastic.yml] [ docker-compose-elastic ] ,
26- that starts Elasticsearch, Kibana, and APM Server on your laptop in one step.
25+ use-cases. We also have [ docker-compose-elastic.yml] [ docker-compose ] ,
26+ that starts Elasticsearch, Kibana, and Elastic Distribution of OpenTelemetry
27+ (EDOT) Collector on your laptop in one step.
2728
2829Once you decided your approach, edit your ` .env ` file accordingly.
2930
@@ -84,8 +85,8 @@ copied to a file name `.env` and updated with `ELASTICSEARCH_URL` and
8485For example, if you started your Elastic Stack with [ k8s-manifest-elastic.yml] [ k8s-manifest-elastic ] ,
8586you would update these values:
8687```
87- ELASTICSEARCH_URL=http://elasticsearch:9200
88- OTEL_EXPORTER_OTLP_ENDPOINT=http://apm-server:8200
88+ ELASTICSEARCH_URL=http://elasticsearch.default.svc :9200
89+ OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector.default.svc:4318
8990```
9091
9192Then, import your ` .env ` file as a configmap like this:
@@ -132,6 +133,7 @@ kubectl port-forward deployment.apps/chatbot-rag-app 4000:4000 &
132133Clean up when finished, like this:
133134``` bash
134135kubectl delete -f k8s-manifest.yml
136+ kubectl delete configmap chatbot-rag-app-env
135137```
136138
137139### Run with Python
@@ -197,16 +199,16 @@ prefix `python` with `opentelemetry-instrument` to enable OpenTelemetry.
197199dotenv run -- opentelemetry-instrument python api/app.py
198200```
199201
200- [ env.example] ( env.example ) defaults to use Elastic APM server, started by
201- [ docker-compose-elastic.yml] ( ../../docker ) . If you start your Elastic stack
202- this way, you can access Kibana like this, authenticating with the username
202+ [ env.example] ( env.example ) defaults to use an OpenTelemetry Collector,
203+ specifically Elastic Distribution of OpenTelemetry (EDOT) Collector, if you
204+ started your Elastic Stack with [ docker-compose-elastic.yml] [ docker-compose ] .
205+ If you did, you can access Kibana like this, authenticating with the username
203206"elastic" and password "elastic":
204207
205208http://localhost:5601/app/apm/traces?rangeFrom=now-15m&rangeTo=now
206209
207- Under the scenes, chatbot-rag-app is automatically instrumented by the Elastic
208- Distribution of OpenTelemetry (EDOT) Python. You can see more details about
209- EDOT Python [ here] ( https://github.com/elastic/elastic-otel-python ) .
210+ Under the scenes, chatbot-rag-app is automatically instrumented by EDOT Python.
211+ You can see more details about EDOT Python [ here] [ edot-python ] .
210212
211213OpenTelemetry support for LLM providers not included in EDOT Python are provided
212214by the [ Langtrace Python SDK] ( https://docs.langtrace.ai/sdk/python_sdk ) .
@@ -260,5 +262,6 @@ docker compose up --build --force-recreate
260262---
261263[ loader-docs ] : https://python.langchain.com/docs/how_to/#document-loaders
262264[ install-es ] : https://www.elastic.co/search-labs/tutorials/install-elasticsearch
263- [ docker-compose-elastic ] : ../../docker/docker-compose-elastic.yml
265+ [ docker-compose ] : ../../docker/docker-compose-elastic.yml
266+ [ edot-python ] : https://github.com/elastic/elastic-otel-python
264267[ k8s-manifest-elastic ] : ../../k8s/k8s-manifest-elastic.yml
0 commit comments