#general

Issue with sdk.start() in Signoz and Next.js

TLDR wafot encountered an error with sdk.start(). Romario clarified that it no longer returns a promise. Ankit requested documentation update.

Powered by Struct AI
eyes1
5
5mo
Solved
Join the chat
Apr 19, 2023 (5 months ago)
wafot
Photo of md5-be53735a2b0297bb542711c1d2ecea45
wafot
08:53 AM
Hi Guys, I'm new on signoz, I'm trying to use signoz in next.js 13,

File: tracing.js
sdk.start()
.then(() => console.log('Tracing initialized'))
^

TypeError: Cannot read properties of undefined (reading 'then')
at Object.<anonymous> (/home/dell/Desktop/intelops/open-telemetry-frontend/next-app-for-test/tracing.js:32:3)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.14.2

I've tried debbuging this on console, which resulted that, sdk.start() was undefined

Please let me know how to fix this
Apr 21, 2023 (5 months ago)
Romario
Photo of md5-6c7925cd4df7e39b036d2b26fb21013d
Romario
08:29 PM
Sdk.start doesn’t return a promise anymore, docs are outdated
08:30
Romario
08:30 PM
Just do: sdk.start()
Apr 22, 2023 (5 months ago)
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
06:18 AM
> Then is not a promise anymore, docs are outdated
vishal-signoz and Ashu can you check if we need to update the docs?
eyes1
Apr 23, 2023 (5 months ago)
Ashu
Photo of md5-c60cdaef3af26ce85163c4c204ce2bd3
Ashu
09:27 AM
ok Ankit