Skip to content

Commit 5795094

Browse files
authored
Update readme with instructions for sending data to local ES instance (#169)
1 parent 12b8aaf commit 5795094

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ Additionally, the OpenTelemetry Contrib collector has also been changed to the [
3030
3. Click "Create an API Key" to create one.
3131
4. Run `./demo.sh serverless docker`
3232

33+
#### Connect to a local Elasticsearch cluster
34+
The following steps shows how to start the Otel demo in a Docker container and send the generated otel data to an Elasticsearch instance running locally on the host.
35+
36+
1. Create an API key
37+
```sh
38+
curl -X POST "http://localhost:9200/_security/api_key" -u USER:PASSWORD -H "Content-Type: application/json" -d'{ "name": "my_api_key" }'
39+
```
40+
41+
2. Update `.env.overide` with URL and API key:
42+
```yml
43+
ELASTICSEARCH_ENDPOINT="http://host.docker.internal:9200"
44+
ELASTICSEARCH_API_KEY="<api key obtained in step 2>"
45+
```
46+
3. Start the Otel demo in a Docker container:
47+
48+
```sh
49+
make start
50+
```
51+
3352

3453
### Manual Installation
3554
<details>
@@ -149,4 +168,4 @@ Suppose you want to see how your new processor is going to play out in this demo
149168
## Clean-up
150169

151170
- **Docker**. Run `./demo.sh destroy docker`
152-
- **Kubernetes**. Run `./demo.sh destroy k8s`
171+
- **Kubernetes**. Run `./demo.sh destroy k8s`

0 commit comments

Comments
 (0)