
Product
Announcing Bun and vlt Support in Socket
Bringing supply chain security to the next generation of JavaScript package managers
@otelic/open-telemetry
Advanced tools
Affordable, searchable logs and traces for your application. Start for free. No monthly payments. Get your FREE API Key in the Workspace Settings at Otelic. Enjoy searchable logs, traces and alerts.
Continue using default console methods, just logs will be available to search, create alerts, see trends at https://app.otelic.com
console.log("Hello");
console.info("Hello");
console.warn("Hello");
console.error("Hello");
console.debug("Hello");
This will also add automatic traces instrumentation. Traces allow to see exactly what happen during the call.
Learn more at https://otelic.com/
instrumentation.ts File can be js too with any name, any path.
process.env.OTELIC_API_KEY = "Get your free API KEY at https://app.otelic.com";
process.env.OTELIC_APP_NAME = "NodeJS App";
process.env.OTELIC_SERVICE_NAME = "My Service";
process.env.OTELIC_SERVICE_VERSION = "v1";
import "@otelic/open-telemetry";
This works with JavaScript and TypeScript
package.json
{
"scripts": {
"start": "node -r ./instrumentation.ts app.ts"
}
}
The -r flag in Node.js stands for --require, and it allows you to preload a module before your main script runs.
If you need to preload multiple modules before your app, just use -r multiple times like so:
node -r instrumentation.js -r else.js app.js
You can preload multiple modules with multiple -r flags:
node -r ./instrumentation.ts -r ./otherSetup.ts app.ts
FAQs
Easiest way to add searchable hosted logs & traces to NodeJS app.
We found that @otelic/open-telemetry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.