Skip to content

Commit

Permalink
example(sumologic): edit readme (#3529)
Browse files Browse the repository at this point in the history
* example(sumologic): edit readme

* examples(sumo): edits per suggestions
  • Loading branch information
adnanrahic committed Jan 17, 2024
1 parent 1611db7 commit 9978afc
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
26 changes: 23 additions & 3 deletions examples/quick-start-sumologic-nodejs/readme.md
Expand Up @@ -8,8 +8,12 @@ This is a simple quick start on how to configure a Node.js app to use OpenTeleme

### 1. Start the Tracetest Agent locally

- Sign up on [`app.tracetest.io`](https://app.tracetest.io).
- Create a new environment.
- Copy the start command under `Settings > Agent`.

```bash
tracetest start
tracetest start --api-key <YOUR_API_KEY>
```

Once started, Tracetest Agent will:
Expand All @@ -20,10 +24,21 @@ Once started, Tracetest Agent will:

Configure Sumo Logic as a Tracing Backend:

- Configure the Tracetest CLI by creating an environment token under `Settings > Tokens`.

```bash
tracetest configure -t <YOUR_API_TOKEN>
```

- Add your Sumo Logic AccessID and AccessKey to `tracetest.datastore.yaml`
- Apply the tracing backend configuration

```bash
tracetest apply datastore -f ./tracetest.datastore.yaml
```

- Configure the OpenTelemetry Collector (`collector.config.yaml`) with a Sumo Logic installation token.

> Note: Here's a guide which Sumo Logic API endpoint to use: https://help.sumologic.com/docs/api/getting-started/#which-endpoint-should-i-should-use
### 2. Start Node.js App
Expand All @@ -34,15 +49,20 @@ You can run the example with Docker.

Set the env vars in `docker-compose.yaml` as follows:

- `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://host.docker.internal:4317`
- `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://otel-collector:4317`

```bash
docker compose up --build
```

### 3. Run tests

Create and run a test against `http://localhost:8080` on [`https://app.tracetest.io/`](https://app.tracetest.io/). View the `./test-api.yaml` for reference.
- Create and run a test against `http://localhost:8080` on [`https://app.tracetest.io/`](https://app.tracetest.io/).
- View the `./test-api.yaml` for reference.

```bash
tracetest run test -f ./test-api.yaml
```

## Steps to run Tracetest Core

Expand Down
Expand Up @@ -25,7 +25,6 @@ services:
retries: 60
environment:
TRACETEST_DEV: ${TRACETEST_DEV}

postgres:
image: postgres:14
environment:
Expand Down
2 changes: 1 addition & 1 deletion examples/quick-start-sumologic-nodejs/tracing.otel.grpc.js
Expand Up @@ -6,6 +6,6 @@ const sdk = new opentelemetry.NodeSDK({
// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is passed into "new OTLPTraceExporter" automatically
traceExporter: new OTLPTraceExporter(),
instrumentations: [getNodeAutoInstrumentations()],
serviceName: 'quick-start-nodejs',
serviceName: 'quick-start-sumologic-nodejs',
})
sdk.start()
2 changes: 1 addition & 1 deletion examples/quick-start-sumologic-nodejs/tracing.otel.http.js
Expand Up @@ -6,6 +6,6 @@ const sdk = new opentelemetry.NodeSDK({
// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is passed into "new OTLPTraceExporter" automatically
traceExporter: new OTLPTraceExporter(),
instrumentations: [getNodeAutoInstrumentations()],
serviceName: 'quick-start-nodejs',
serviceName: 'quick-start-sumologic-nodejs',
})
sdk.start()

0 comments on commit 9978afc

Please sign in to comment.