This is the demo in the README.md of the library.
You will need Node.js (>= 18) and Fastly CLI (>= 9.0.3).
This example will export traces to a local instance of an OpenTelemetry Collector. It has been tested with OpenTelemetry Collector Demo.
First, build compute-js-opentelemetry
.
Clone fastly/compute-js-opentelemetry
and build it:
git clone https://github.com/fastly/compute-js-opentelemetry.git
cd compute-js-opentelemetry
npm install
npm run build
Next, move to this subdirectory, and build this example:
cd examples/readme-demo
npm install
npm run build
To run this example locally:
npm run serve