@coralogix/opentelemetry
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Coralogix Opentelemetry

Flows With Express

To use coralogix flows with express you must use the setExpressApp function to make sure that the coralogix sampler understands your routes and endpoints.

Example:

const sampler = new CoralogixTransactionSampler();

const tracerProvider = new BasicTracerProvider({
    resource: new Resource({
        [SemanticResourceAttributes.SERVICE_NAME]: '<your-service-name>'
    }),
    sampler
});
import express from "express";
import router from "./router";

const app = express();
app.use('/', router);

sampler.setExpressApp(app);

app.listen(3000, () => {
    console.log('Server is running')
});

Readme

Keywords

none

Package Sidebar

Install

npm i @coralogix/opentelemetry

Weekly Downloads

2,555

Version

0.1.3

License

none

Unpacked Size

34.5 kB

Total Files

8

Last publish

Collaborators

  • coralogixnpm