Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example(sumologic): edit readme #3529

Merged
merged 2 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 23 additions & 3 deletions examples/quick-start-sumologic-nodejs/readme.md
Original file line number Diff line number Diff line change
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`
adnanrahic marked this conversation as resolved.
Show resolved Hide resolved

```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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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()