This sample project shows a React front-end instrumented with Honeycomb's open-source Web SDK, pointing to a backend service running in Node.js and Express, which is instrumented with the OpenTelemetry Node SDK, part of opentelemetry-js.
It is a simple demo to show the minimum configuration needed to:
- Capture web-layer traces including click events and document loading
- Trace fetch calls which make requests to a network service REST API
- Pick up and trace incoming routes to Express in a Node.js application
- Follow the trace to the handlers, with introduced latency in a middleware function
- cp packages/client/.env-sample packages/client/.env
- cp packages/server/.env-sample packages/server/.env
- cp .env-sample .env and change the
HONEYCOMB_API_KEY
to your Honeycomb ingest key so the collector can send data to honeycomb - Login to docker (
docker login
) - Login to ghcr.io (
docker login ghcr.io
)
docker compose up --build
Note: JSON-based logging via bunyan for app server in docker logs, as is all container builds, database and other logging information
The react frontend is hosted at http://localhost:5173
- Node.js LTS
- Docker and compose
- A Honeycomb account