traceo
traceo copied to clipboard
Install Browser/JS SDK
More than reporting a BUG or similar, this issue is a very direct question.
How do I install the SDK for a project in Angular or similar, I can start reporting to the server.
I can't finish the issue without first congratulating you for the work you have done and I hope to contribute my grain of code to the project.
I hope to have an answer, thank you
Hi @CarlosPinedaT, thank you for this issue.
For now there is a possibility to use sdk for browser, but only for React and Vue. Support for Angular should be added in the future, but it highly depend on my personal amount of free time. Therefore, any support is welcome :)
Hello, thanks for the answer, Any way to integrate it with native Javascript currently?
Hello, thanks for the answer, Any way to integrate it with native Javascript currently?
For browser - no, for NodeJS in backend side you can use this package.
@CarlosPinedaT
import { BrowserClient, VERSION, ClientOptions } from "@traceo-sdk/browser";
class Client extends BrowserClient {
constructor(apiKey: string, options: ClientOptions) {
super({
headers: {
"x-sdk-name": "react",
"x-sdk-version": VERSION,
"x-sdk-key": apiKey,
},
options: {
...options,
apiKey,
},
});
}
public postInitSDK(): void {}
}
new Client("apiKey", { performance: false, host: "host" });