Skip to content

fix: transaction name for Next.js API routes in next@13.2 was broken - #3178

Merged
trentm merged 3 commits into
mainfrom
trentm/next-13.2-fix
Mar 1, 2023
Merged

fix: transaction name for Next.js API routes in next@13.2 was broken#3178
trentm merged 3 commits into
mainfrom
trentm/next-13.2-fix

Conversation

@trentm

@trentm trentm commented Feb 28, 2023

Copy link
Copy Markdown
Member

Before this change internal changes in next@13.2.0 resulted in
transactions for Next.js API routes being {method} unknown route.

Before this change internal changes in next@13.2.0 resulted in
transactions for Next.js API routes being `{method} unknown route`.
@trentm trentm self-assigned this Feb 28, 2023
@github-actions github-actions Bot added the agent-nodejs Make available for APM Agents project planning. label Feb 28, 2023
@ghost

ghost commented Feb 28, 2023

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview previewSnapshots

Expand to view the summary

Build stats

  • Start Time: 2023-03-01T18:28:24.995+0000

  • Duration: 24 min 7 sec

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run module tests for <modules> : Run TAV tests for one or more modules, where <modules> can be either a comma separated list of modules (e.g. memcached,redis) or the string literal ALL to test all modules

  • run benchmark tests : Run the benchmark test only.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@trentm

trentm commented Feb 28, 2023

Copy link
Copy Markdown
Member Author

run module tests for next

@trentm

trentm commented Feb 28, 2023

Copy link
Copy Markdown
Member Author

run module tests for next

1 similar comment
@trentm

trentm commented Mar 1, 2023

Copy link
Copy Markdown
Member Author

run module tests for next

if (waitErr) {
t.fail(`error waiting for Next.js server to be ready: ${waitErr.message}`)
nextServerProc.kill('SIGKILL')
treekill(nextServerProc.pid, 'SIGKILL')

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REVIEW NOTE: The treekill usage was added because on macOS I was running into a failure in TAV=next npm run test:tav when the second next version was run. The used port (port 3000) was still busy when the next start server was started for the second run. It was as if the process for the next dev server from the previously tested version was still running. The treekill usage proved useful for a similar case of a process tree in the azure-functions tests.

@trentm
trentm merged commit c7f534d into main Mar 1, 2023
@trentm
trentm deleted the trentm/next-13.2-fix branch March 1, 2023 21:38
v1v added a commit to v1v/apm-agent-nodejs that referenced this pull request Mar 21, 2023
* upstream/main: (44 commits)
  action: abort builds when new commit (elastic#3196)
  docs: note that 3.40.0 was bad release (elastic#3194)
  chore(deps-dev): bump @babel/cli from 7.20.7 to 7.21.0 (elastic#3170)
  chore(deps-dev): bump @babel/core from 7.20.2 to 7.21.0 (elastic#3169)
  ci: drop max-parallel for GH actions (elastic#3191)
  test: correct sense of test message (elastic#3186)
  3.43.0 (elastic#3184)
  test, ci: some small changes (elastic#3183)
  ci: limit parallel GH Action test runs to try to avoid 429 errors on checkout (elastic#3180)
  fix: transaction name for Next.js API routes in next@13.2 was broken (elastic#3178)
  mongodb@5 support (elastic#3177)
  chore(deps-dev): bump body-parser from 1.20.1 to 1.20.2 (elastic#3171)
  chore(deps-dev): bump restify from 11.0.0 to 11.1.0 (elastic#3172)
  docs: minor fix in README for Azure Functions example (elastic#3175)
  feat: Make Agent.flush() return a Promise if no callback is passed as param (elastic#3167)
  chore(deps-dev): bump @types/node from 18.11.9 to 18.14.0 (elastic#3165)
  chore(deps-dev): bump @hapi/hapi from 21.2.1 to 21.3.0 (elastic#3166)
  chore(deps-dev): bump undici from 5.19.1 to 5.20.0 (elastic#3164)
  chore(deps-dev): bump fastify from 4.12.0 to 4.13.0 (elastic#3154)
  Use composite action for updatecli workflow (elastic#3162)
  ...
@trentm trentm mentioned this pull request Apr 11, 2023
PeterEinberger pushed a commit to fpm-git/apm-agent-nodejs that referenced this pull request Aug 20, 2024
…lastic#3178)

Before this change internal changes in next@13.2.0 resulted in
transactions for Next.js API routes being `{method} unknown route`.

This fixes TAV test failures of late.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-nodejs Make available for APM Agents project planning.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants