Skip to content
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

Fix Next.js instrumentation #868

Closed
6 tasks done
unflxw opened this issue Feb 22, 2023 · 8 comments
Closed
6 tasks done

Fix Next.js instrumentation #868

unflxw opened this issue Feb 22, 2023 · 8 comments
Assignees
Labels

Comments

@unflxw
Copy link
Contributor

unflxw commented Feb 22, 2023

I took a look at a Next.js application that Shairyar prepared (Slack conversation), instrumented with our Express documentation as described in the docs. We couldn't get it to report routing correctly — all requests end up logged as GET, even for requests to other endpoints using getServerSideProps, which should be hitting the server.

I think the Next.js instrumentation, at least in the way we suggest it’s set up in the docs, is likely broken.

To do

@backlog-helper
Copy link

backlog-helper bot commented Feb 22, 2023

✔️ All good!

New issue guide | Backlog management | Rules | Feedback

@unflxw unflxw added the bug label Feb 22, 2023
@unflxw unflxw changed the title Fix Next.js instrumentation with OpenTelemetry? Fix Next.js instrumentation with OpenTelemetry Feb 23, 2023
@unflxw unflxw changed the title Fix Next.js instrumentation with OpenTelemetry Fix Next.js instrumentation Feb 23, 2023
@shairyar
Copy link
Member

@unflxw
Copy link
Contributor Author

unflxw commented Feb 24, 2023

Confirming that it's really broken.

Let's see if we can find a quick win to make this work in some circumstances -- even if it it's something that isn't ideal, like downgrading Next.js.

In the not-so-long term, it seems that the Next.js team are working on a built-in OpenTelemetry instrumentation. So eventually, supporting that and asking users to upgrade Next would be the way to go.

It might be possible to backport some of that instrumentation, or take inspiration from it to fix this.

@tombruijn
Copy link
Member

@tombruijn
Copy link
Member

Next.js has a new release 13.2.0 with OpenTelemetry instrumentation. Let's use that.

@unflxw
Copy link
Contributor Author

unflxw commented Mar 20, 2023

Updating here as well: waiting on some improvements to the Next.js OpenTelemetry instrumentation that are currently in progress.

@jeffkreeftmeijer
Copy link
Member

@unflxw
Copy link
Contributor Author

unflxw commented May 2, 2023

AppSignal for Node.js 3.0.14 was just released, which includes support for Next.js instrumentation via their newly-added, built-in OpenTelemetry support. It requires Next.js version 13.3.0 or above, and it is not compatible with the use of custom servers. Check out our Next.js integration documentation.

@unflxw unflxw closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants