Skip to content

Commit 5d624f5

Browse files
Merge pull request #7 from traceo-dev/feat/otel
Feat/otel
2 parents b624a8b + 48d1825 commit 5d624f5

File tree

11 files changed

+23
-24
lines changed

11 files changed

+23
-24
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ A set of SDKS for integration with the [Traceo Platform](https://github.com/trac
66
This repository contains all the SDKs needed for integration in Javascript/Typescript projects. Detailed instructions for the SDK implementation process can be found in the individual README for each SDK.
77

88
- [`@traceo-sdk/node`](https://github.com/traceo-dev/traceo-sdk/tree/develop/packages/node) - NodeJS.
9+
- [`@traceo-sdk/opentelemetry-node`](https://github.com/traceo-dev/traceo-sdk/tree/develop/packages/opentelemetry-node) - Open Telemetry for Node.
910
- [`@traceo-sdk/react`](https://github.com/traceo-dev/traceo-sdk/tree/develop/packages/react) - React.
1011
- [`@traceo-sdk/vue`](https://github.com/traceo-dev/traceo-sdk/tree/develop/packages/vue) - Vue.
1112

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "0.31.8",
3+
"version": "0.33.0",
44
"npmClient": "yarn",
55
"useWorkspaces": true
66
}

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@traceo-sdk/browser",
3-
"version": "0.32.1",
3+
"version": "0.33.0",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"license": "MIT",

packages/node-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@traceo-sdk/node-core",
3-
"version": "0.32.2",
3+
"version": "0.33.0",
44
"author": "Traceo",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

packages/node/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,12 @@ First what you need is to initialize `TraceoClient` in your application.
1717
```ts
1818
import { TraceoClient } from "@traceo-sdk/node";
1919

20-
new TraceoClient({
21-
projectId: <your_project_id>,
22-
url: <you_traceo_instance_url>
20+
new TraceoClient(<project_api_key>, {
21+
host: <traceo_host>
2322
});
2423
```
2524

26-
`TraceoClient` options require two parameters. `projectId` is a unique identifier of an application created on the Traceo platform. Information about application ID you can get from the Traceo Platform in `Settings|Details` tab. `url` parameter specifies the address where your Traceo Platform instance is located. Address should be passed in the format `<protocol>://<domain>:<port>`, eq. `http://localhost:3000`.
25+
`TraceoClient` constructor required two attribtues. First one in api key which you can generate in project settings. Second is an object contains required attribute `host` which specifies the address where your Traceo Platform instance is located. Address should be passed in the format `<protocol>://<domain>:<port>`, eq. `http://localhost:3000`.
2726

2827
### Incidents handling
2928
Incidents are all the exceptions and other problems that occur in your application. After each exception occurs, the Traceo SDK catches the exception and sends it to the Traceo Platform. This package provide the two main ways to catch exceptions in your application - `Handlers` and `Middlewares`.
@@ -96,7 +95,8 @@ The Traceo SDK can be used also as a logger. Each log is saved on the Traceo Pla
9695
```ts
9796
import { TraceoClient } from "@traceo-sdk/node";
9897

99-
new TraceoClient({
98+
new TraceoClient(<project_api_key>, {
99+
host: <traceo_host>,
100100
scrapLogsInterval: 120 //in seconds
101101
});
102102
```

packages/node/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@traceo-sdk/node",
3-
"version": "0.32.2",
3+
"version": "0.33.0",
44
"author": "Traceo",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -25,7 +25,7 @@
2525
},
2626
"dependencies": {
2727
"stacktrace-parser-node": "^1.1.3",
28-
"@traceo-sdk/node-core": "0.32.2",
28+
"@traceo-sdk/node-core": "0.33.0",
2929
"os": "^0.1.2"
3030
},
3131
"devDependencies": {

packages/opentelemetry-node/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@traceo-sdk/opentelemetry-node",
3-
"version": "0.32.2",
3+
"version": "0.33.0",
44
"author": "Traceo",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
2828
"@opentelemetry/api-logs": "^0.39.1",
2929
"@opentelemetry/exporter-metrics-otlp-http": "^0.38.0",
3030
"@opentelemetry/exporter-trace-otlp-http": "^0.39.1",
31-
"@traceo-sdk/node-core": "0.32.2",
31+
"@traceo-sdk/node-core": "0.33.0",
3232
"os": "^0.1.2",
3333
"stacktrace-parser-node": "^1.1.3"
3434
},

packages/react/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use this SDK initialize `TraceoClient` in your application.
1717
```ts
1818
import { TraceoClient } from "@traceo-sdk/react";
1919

20-
new TraceoClient(<app_api_key>, {
20+
new TraceoClient(<project_api_key>, {
2121
host: <traceo_host>
2222
});
2323

@@ -33,10 +33,8 @@ If you are using React in version >16 you can use `ErrorBoundary` component impo
3333

3434
```ts
3535

36-
const traceoInstance = new TraceoClient({
37-
projectId: <your_application_id>,
38-
apiKey: <app_api_key>,
39-
url: <you_traceo_instance_url>
36+
const traceoInstance = new TraceoClient(<project_api_key>, {
37+
host: <traceo_host>
4038
});
4139

4240

@@ -50,7 +48,7 @@ const traceoInstance = new TraceoClient({
5048
To enable collect of web-vitals data, you have to set `performance` param to `true` like below:
5149

5250
```ts
53-
new TraceoClient(<app_api_key>, {
51+
new TraceoClient(<project_api_key>, {
5452
host: <traceo_host>,
5553
performance: true
5654
});

packages/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@traceo-sdk/react",
3-
"version": "0.32.1",
3+
"version": "0.33.0",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"license": "MIT",
@@ -23,7 +23,7 @@
2323
"test:watch": "jest --watch --notify"
2424
},
2525
"dependencies": {
26-
"@traceo-sdk/browser": "0.32.1"
26+
"@traceo-sdk/browser": "0.33.0"
2727
},
2828
"peerDependencies": {
2929
"react": ">= 16.8.6 < 19"

packages/vue/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { TraceoClient } from "@traceo-sdk/vue";
1919

2020
const app = createApp({ ... });
2121

22-
new TraceoClient(<app_api_key>, {
22+
new TraceoClient(<project_api_key>, {
2323
host: <traceo_host>
2424
});
2525

@@ -31,7 +31,7 @@ app.mount("#app");
3131
### Performance
3232
To enable collect of web-vitals data, you have to set performance param to true like below:
3333
```ts
34-
new TraceoClient(<app_api_key>, {
34+
new TraceoClient(<project_api_key>, {
3535
host: <traceo_host>,
3636
performance: true
3737
});

0 commit comments

Comments
 (0)