Skip to content

Commit 3762a2e

Browse files
committed
Merge branch 'develop' of https://github.com/Piotrek98/klepper.io-node into develop
2 parents f24e7ba + 8da373c commit 3762a2e

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ Library for integration with the [Traceo Platform](https://github.com/traceo-dev
66
### Installation
77
To install this SDK add this package to your package.json like below:
88
```
9-
yarn add traceo
9+
yarn add @traceo-sdk/node
1010
```
1111
or
1212
```
13-
npm install traceo
13+
npm install @traceo-sdk/node
1414
```
1515

1616
### Usage
1717
First 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

2121
new 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
3333
The 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

3737
try {
3838
//your code
@@ -45,7 +45,7 @@ If you use [NestJS](https://nestjs.com/) framework then you can also create [Int
4545

4646
traceo.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

7171
Javascript:
7272
```js
73-
import { ExceptionMiddlewares } from "traceo";
73+
import { ExceptionMiddlewares } from "@traceo-sdk/node";
7474

7575
app.use(ExceptionMiddlewares.errorMiddleware());
7676
```
7777

7878
Typescript:
7979
```ts
80-
const { ExceptionMiddlewares } from "traceo";
80+
const { ExceptionMiddlewares } from "@traceo-sdk/node";
8181

8282
app.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

9898
To 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

102102
const logger = new Logger();
103103
```

0 commit comments

Comments
 (0)