infrastack-interview-fs-bs
v1.0.8
Published
Infrastack AI assignment OpenTelemetry Wrapper
Downloads
9
Readme
[!WARNING]
Use dynamic import if you are using ESM. Example:
import { register } from "infrastack-interview-fs-bs";
register({
endpoint: OTEL_COLLECTOR_URL,
instruments: ["http", "express"],
logLevel: DiagLogLevel.DEBUG,
serviceName: "auth-service",
});
(async () => {
const express = await import("express");
const app: Express = express.default();
const port = parseInt(process.env.PORT || "3000", 10);
app.listen(port, () => {
console.log(`[server]: Server is running at http://localhost:${port}`);
});
})();