OTEL-JS packages in use:
Package | |
---|---|
@opentelemetry/exporter-trace-otlp-http | To export to OTELCOL via OTLP/HTTP |
@opentelemetry/exporter-metrics-otlp-http | Metrics exporter via OTLP/HTTP |
@opentelemetry/instrumentation-express | Express auto-instrumentation plugin |
@opentelemetry/instrumentation-http | Required to be used with @opentelemetry/instrumentation-express |
@opentelemetry/resources | To be used with semantic-conventions to identify the application/service's name |
@opentelemetry/sdk-node | For automatic instrumentation |
@opentelemetry/semantic-conventions | To be used with resources to identify the application/service's name |
The purpose of this repository is to ensure that a basic Express app's traces are correctly generated and successfully exported to the final destination which is the OpenTelemetry collector.
With this, we can make safer modifications and experiments according to the evolution of the APIs of the OTEL-JS modules.
# This will download and start OTELCOL
./scripts/start.sh
# Start the example
npm install
npm run build
npm start
# Create some spans
curl -v http://localhost:8080
# Check the results
curl -s http://localhost:8888/metrics
killall node
./scripts/stop.sh
Open a terminal and run
podman-compose up
Open a new terminal and run
npm install
npm run build
npm start