-
Notifications
You must be signed in to change notification settings - Fork 27.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run Next in developer mode throws error TypeError: _tracer.tracer.withSpan is not a function when using Opentelemetry tracing #22574
Labels
bug
Issue was opened via the bug report template.
Comments
This problem has been fixed in the |
Reopening this ticket as the problem still exists when actually starting an exporter this time it's the
|
kodiakhq bot
pushed a commit
that referenced
this issue
Mar 10, 2021
A number of changes here. I recommend viewing the diff with the <a href="?w=1">whitespace flag enabled</a>. - OpenTelemetry is replaced with a custom and lightweight tracing solution. - Three trace targets are currently supported: console, Zipkin, and NextJS. - Tracing is now governed by environment variables rather than `--require instrument.js`. + `TRACE_TARGET`: one of `CONSOLE`, `ZIPKIN`, or `TELEMETRY`; defaults to `TELEMETRY` if unset or invalid. + `TRACE_ID`: an 8-byte hex-encoded value used as the Zipkin trace ID; if not provided, this value will be randomly generated and passed down to subprocesses. Other sundry: - I'm missing something, probably a setup step, with the Zipkin target. Traces are captured successfully, but you have to manually enter the Trace ID in order to view the trace - it doesn't show up in queries. - I'm generally unhappy with [this commit](235cedc). It is... untidy to provide a telemetry object via `setGlobal`, but I don't have a ready alternative. Is `distDir` strictly required when creating a new Telemetry object? I didn't dig too deep here. As noted, there are a lot of changes, so it'd be great if a reviewer could: - [ ] pull down the branch and try to break it - [ ] check the Zipkin traces and identify possible regressions in the functionality Closes #22570 Fixes #22574
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
10.0.7
What version of Node.js are you using?
14.16.0
What browser are you using?
Edge
What operating system are you using?
macOS
How are you deploying your application?
local development
Describe the Bug
I am trying to integrate Opentelemetry 0.17 in my API routes but when I am running Next with custom server with the option
const nextApp = next({ dev: true })
the application fails to process any handlers because of the following error:Expected Behavior
Next will load without any thrown errors and I am able to instrument my own code with the
@opentelemetry
-packagesTo Reproduce
Please clone the repo that reproduces the problem: https://github.com/weyert/next-opentelemetry-bug:
4: Open in http://127.0.0.1:3000 (edited)
after it finished loading you will see the following output:
The text was updated successfully, but these errors were encountered: