A creative web application that generates OpenTelemetry metrics, traces, and logs for testing telemetry backends.
- Page Load Metrics: Tracks page loads with browser and referrer attributes
- Fortune Cookies: Serves developer-themed fortunes with custom counters
- Error Simulation: Randomly triggers different HTTP errors for alerting tests
- Slow Operations: Simulates multi-step operations with timing metrics
- Mood Tracking: Records user mood scores in a histogram
- Active Users: Tracks concurrent users with an up/down counter
- Auto-Refresh: Built-in page refresh options for continuous metric generation
- Install dependencies:
npm install- Configure your OTLP endpoint (for Datadog, New Relic, Honeycomb, etc.):
# For Datadog
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://trace.agent.datadoghq.com/v0.7/traces"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="https://api.datadoghq.com/v1/series"
# For New Relic
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://otlp.nr-data.net:4318/v1/traces"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="https://otlp.nr-data.net:4318/v1/metrics"
# For Honeycomb
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="https://api.honeycomb.io/v1/traces"
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT="https://api.honeycomb.io/v1/metrics"-
Add your API key/headers as needed by your provider
-
Start the app:
npm start- Visit http://localhost:3000 and interact with the features!
page_loads: Counter with browser and referrer labelshttp_request_duration: Histogram of request durationsactive_users: UpDown counter for concurrent usersfortune_cookies_served: Counter with fortune type labelsuser_mood_score: Histogram of mood ratings (1-10)
Every endpoint creates spans with relevant attributes and events:
- Home page loads
- Fortune cookie selections
- Error simulations
- Slow operation steps
- Mood recordings