Package Exports
- @vercel/otel
- @vercel/otel/package.json
Readme
🚀 Vercel Otel
vercel/otel is a simple and easy-to-use package that sets up your trace provider and exporter, and bundles all OpenTelemetry APIs in a single package. It's not as powerful as using raw APIs, but it should be enough for most cases.
💡 Use this package to quickly instrument your applications and get started with OpenTelemetry!
📦 Installation
npm install vercel/otel📚 Usage
const { register, trace } = require("vercel/otel");
// Register the OpenTelemetry provider with an HTTP exporter
register("your-service-name");
// Now you can use the OpenTelemetry APIs
const span = trace.getTracer("your-component").startSpan("your-operation");📖 API Reference
register(serviceName: string)
Registers the OpenTelemetry provider with an HTTP exporter using the given service name. This is all that is needed to trace your app on Vercel.
serviceName: The name of your service, used as the app name in many OpenTelemetry backends.
Re-exported APIs
This package re-exports everything from @opentelemetry/api. Refer to the official OpenTelemetry API documentation for details on how to use these APIs.
📄 License
Made with 💖 by the Vercel. Happy tracing! 📈