https://github.com/datadrivers/opentelemetry-hand-on
OpenTelemetry setup showing its capabilities
https://github.com/datadrivers/opentelemetry-hand-on
Last synced: 4 months ago
JSON representation
OpenTelemetry setup showing its capabilities
- Host: GitHub
- URL: https://github.com/datadrivers/opentelemetry-hand-on
- Owner: datadrivers
- License: mit
- Created: 2025-02-13T09:35:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-13T14:28:22.000Z (about 1 year ago)
- Last Synced: 2025-08-07T17:53:27.166Z (10 months ago)
- Language: TypeScript
- Size: 58.6 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenTelemetry Hands-On
OpenTelemetry setup showing its capabilities.
Using:
- Node.js
- An example app to send traces, metrics and logs via OpenTelemetry SDK
- OpenTelemetry Collector
- To receive metrics and logs
- To export metrics to Prometheus and export logs to Loki
- Jaeger
- To receive and visualize traces
- Prometheus - To gather metrics
- Grafana - To visualize metrics from Prometheus
- Loki - To visualize logs
## URLs
- Jaeger - http://localhost:16686
- Prometheus - http://localhost:9090
- Grafana - http://localhost:3000
- User: `admin`
- Default password: `admin`
- Loki - http://localhost:3100
## TODOs
- [ ] Decide whether to use Jaeger or OpenTelemetry Collector to collect traces, metrics and logs
- [ ] If Jaeger: Find a way to export data sent to Jaeger to Prometheus for metrics and Loki for logs
- [ ] If OpenTelemetry Collector: Find a way to export traces to Jaeger, metrics to Prometheus and logs to Loki
## App Set Up
```bash
cd ./app
# Use the correct Node.js version defined in .nvmrc
nvm use
# Install the dependencies
npm install
```
## Docker Compose Set Up
```bash
# Build the Docker Image in ./app
docker compose build
# Start the services
docker compose up -d
# Check the logs of the app
docker compose logs -f app
# ... or of the collector
docker compose logs -f otel-collector
```
## Send requests to the app
```bash
# GET /rolldice
curl http://localhost:8080/rolldice
# GET /rollrick
curl http://localhost:8080/rollrick
```