Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Instrumentation broken in [email protected] #120

Closed
jmartin4563 opened this issue Apr 24, 2023 · 5 comments · Fixed by #124
Closed

Instrumentation broken in [email protected] #120

jmartin4563 opened this issue Apr 24, 2023 · 5 comments · Fixed by #124
Labels
bug Something isn't working

Comments

@jmartin4563
Copy link
Contributor

Description

In the 13.3.1 release of Next.js, our instrumentation is failing to fully register due to a change in the Next.js' webpack output. Specifically, the render and context modules are now output without setter functions, which means we're unable to apply our monkeypatch.

Expected Behavior

Versioned tests run successfully on 13.3.1

Steps to Reproduce

  1. npm run verisoned:major
  2. Observe that tests fail on 13.3.1
  3. Observer error messages in the agent log: Cannot set property renderToHTML of #<Object> which has only a getter and Cannot set property getModuleContext of #<Object> which has only a getter

Additional context

Next.js@12 Context output
Screenshot 2023-04-24 at 2 04 08 PM

[email protected] Context output
Screenshot 2023-04-24 at 2 04 43 PM

@jmartin4563 jmartin4563 added bug Something isn't working needs-triage labels Apr 24, 2023
@workato-integration
Copy link

jmartin4563 added a commit to jmartin4563/newrelic-node-nextjs that referenced this issue Apr 24, 2023
jmartin4563 added a commit that referenced this issue Apr 24, 2023
test: pin versioned tests to < 13.3.1 until #120 is fixed
@workato-integration
Copy link

Jira CommentId: 188489
Commented by revans:

If we do NEWRELIC-8278 this would be done. We can use this as an actual test case to confirm.

@kdembowski
Copy link

Hey there, would #124 also cover Next's app directory?
I've been trying to set up log forwarding with it, but it doesn't send any logs at all. Same set up works with pages directory.

@bizob2828
Copy link
Member

bizob2828 commented May 22, 2023

@kdembowski it will not. Can you please file a separate feature request for this please? It sounds like you want to file two. One for some log forwarding capabilities and something around "works with pages directory". Also, when you file those feature requests please provided as much context/example as possible so we can properly evaluate it.

@kdembowski
Copy link

@bizob2828 I created #126.
By "works with pages directory" I meant that exact same configuration of logger+newrelic worked in /pages, while it does not work with the new app router introduced in Next 13 (unless I'm doing something wrong).
Let me know if you need anything else

@bizob2828 bizob2828 moved this to Done: Issues recently completed in Node.js Engineering Board Jul 15, 2024
bizob2828 pushed a commit to bizob2828/newrelic-node-nextjs that referenced this issue Jul 26, 2024
bizob2828 pushed a commit to bizob2828/newrelic-node-nextjs that referenced this issue Jul 26, 2024
…ests

test: pin versioned tests to < 13.3.1 until newrelic#120 is fixed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Archived in project
3 participants