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

Does not work with Fastify v4 #2117

Closed
gajus opened this issue Jun 9, 2022 · 2 comments
Closed

Does not work with Fastify v4 #2117

gajus opened this issue Jun 9, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@gajus
Copy link

gajus commented Jun 9, 2022

Simply starting server using dd-trace/init makes the server crash:

TypeError: next is not a function
    at /Users/gajus/Documents/dev/contra/contra-web-app/node_modules/dd-trace/packages/datadog-instrumentations/src/fastify.js:129:41
    at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
    at Object.preParsing (/Users/gajus/Documents/dev/contra/contra-web-app/node_modules/dd-trace/packages/datadog-instrumentations/src/fastify.js:129:19)
    at next (/Users/gajus/Documents/dev/contra/contra-web-app/node_modules/fastify/lib/route.js:501:16)
    at preParsingHookRunner (/Users/gajus/Documents/dev/contra/contra-web-app/node_modules/fastify/lib/route.js:524:3)
    at runPreParsing (/Users/gajus/Documents/dev/contra/contra-web-app/node_modules/fastify/lib/route.js:475:5)
    at next (/Users/gajus/Documents/dev/contra/contra-web-app/node_modules/fastify/lib/hooks.js:168:7)
    at /Users/gajus/Documents/dev/contra/contra-web-app/node_modules/dd-trace/packages/datadog-instrumentations/src/fastify.js:62:29
    at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
    at arguments.<computed> (/Users/gajus/Documents/dev/contra/contra-web-app/node_modules/dd-trace/packages/datadog-instrumentations/src/fastify.js:61:38)
    at Logger_1.Logger.adopt.nextMessage (/Users/gajus/Documents/dev/contra/contra-web-app/server/adoptDataDog.ts:8:7)
    at /Users/gajus/Documents/dev/contra/contra-web-app/node_modules/roarr/dist/src/factories/createLogger.js:198:20
    at AsyncLocalStorage.run (node:async_hooks:327:14)
    at Function.log.adopt (/Users/gajus/Documents/dev/contra/contra-web-app/node_modules/roarr/dist/src/factories/createLogger.js:192:34)
    at adoptDataDog (/Users/gajus/Documents/dev/contra/contra-web-app/server/adoptDataDog.ts:6:15)
    at Object.<anonymous> (/Users/gajus/Documents/dev/contra/contra-web-app/server/startHttpService.ts:85:17)
@gajus gajus added the bug Something isn't working label Jun 9, 2022
@NickDub
Copy link

NickDub commented Jun 10, 2022

Issue better explained in #2118 😉

@rochdev
Copy link
Member

rochdev commented Jun 10, 2022

This was fixed in #2114 and we're in the process of shipping a new patch release.

@rochdev rochdev closed this as completed Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants