@@ -6,17 +6,17 @@ Library for integration with the [Traceo Platform](https://github.com/traceo-dev
66### Installation
77To install this SDK add this package to your package.json like below:
88```
9- yarn add traceo
9+ yarn add @ traceo-sdk/node
1010```
1111or
1212```
13- npm install traceo
13+ npm install @ traceo-sdk/node
1414```
1515
1616### Usage
1717First what you need is to initialize ` TraceoClient ` in your application.
1818``` ts
19- import { TraceoClient } from " traceo" ;
19+ import { TraceoClient } from " @ traceo-sdk/node " ;
2020
2121new TraceoClient ({
2222 appId: <your_application_id >,
@@ -32,7 +32,7 @@ Incidents are all the exceptions and other problems that occur in your applicati
3232##### Handlers
3333The easiest way is to use ` ExceptionsHandlers.catchException() ` in ` try-catch ` clause like below:
3434``` ts
35- import { ExceptionHandlers } from " traceo" ;
35+ import { ExceptionHandlers } from " @ traceo-sdk/node " ;
3636
3737try {
3838 // your code
@@ -45,7 +45,7 @@ If you use [NestJS](https://nestjs.com/) framework then you can also create [Int
4545
4646traceo.interceptor.ts
4747``` ts
48- import { ExceptionHandlers } from " traceo" ;
48+ import { ExceptionHandlers } from " @ traceo-sdk/node " ;
4949// other imports
5050
5151@Injectable ()
@@ -70,14 +70,14 @@ Another approach is to use `ExceptionMiddlewares.errorMiddleware()`. If you use
7070
7171Javascript:
7272``` js
73- import { ExceptionMiddlewares } from " traceo" ;
73+ import { ExceptionMiddlewares } from " @ traceo-sdk/node " ;
7474
7575app .use (ExceptionMiddlewares .errorMiddleware ());
7676```
7777
7878Typescript:
7979``` ts
80- const { ExceptionMiddlewares } from "traceo";
80+ const { ExceptionMiddlewares } from "@ traceo-sdk/node ";
8181
8282app .use (ExceptionMiddlewares .errorMiddleware () as express .ErrorRequestHandler );
8383```
@@ -97,7 +97,7 @@ The Traceo SDK can be used also as a logger. Each log is saved on the Traceo Pla
9797
9898To use logger feature in your app use ` Logger ` from ` traceo ` package like below:
9999``` ts
100- import { Logger } from " traceo" ;
100+ import { Logger } from " @ traceo-sdk/node " ;
101101
102102const logger = new Logger ();
103103```
0 commit comments