Tracing
Issues with Auto-instrumentation (Typescript / Javascript)
How to overcome issues with automatic instrumentations on Next.js and some Webpack environments.
Some customers have reported issues with automatic instrumentations on some environments. This means that even though the SDK was installed and configured properly, you might not be seeing any traces.
Specifically, we have seen issues with Next.js and some configurations of Webpack. In order to resolve it, you can provide the SDK with the libraries that you use (like OpenAI, LlamaIndex, Langchain, etc.) to make sure they are instrumented properly.
You won’t need this on most environments. We recommend trying without it first.
Here is an example of how to do it:
You only need to do it once, on app initialization.
Was this page helpful?