open-telemetry/opentelemetry-js — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a TypeScript library for JavaScript apps that helps developers collect telemetry, meaning traces, metrics, and logs, using the OpenTelemetry approach.

I want it to be easy to add to a Node.js app with a small tracing setup file, start the SDK, automatically capture common app activity, and export the results to the console for local debugging. It should also leave room to send data to an OpenTelemetry collector later.

Please include a clean public API for app developers and library authors, simple manual tracing for cases where automatic capture is not enough, graceful shutdown on process exit, and a diagnostics logger so people can figure out why telemetry is not showing up.

Make the project feel production ready, with TypeScript source, examples, tests, basic docs, and support for both CommonJS and ES modules where reasonable. Look up the current OpenTelemetry JavaScript docs if you need to.

Want more depth? Deep Reverse