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

Support: Fastify v5 #4828

Open
clarkenciel opened this issue Oct 25, 2024 · 0 comments
Open

Support: Fastify v5 #4828

clarkenciel opened this issue Oct 25, 2024 · 0 comments

Comments

@clarkenciel
Copy link

clarkenciel commented Oct 25, 2024

Fastify v5 has changed the signature for custom logger registration.
dd-trace's auto-instrumentation for fastify is now broken for fastify v5.

Here's an example error from our logs:

REDACTED/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/logger.js:84
    throw new FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED()
          ^
FastifyError [Error]: You cannot provide both logger and loggerInstance. Please provide only one.
    at createLogger (REDACTED/node_modules/.pnpm/[email protected]/node_modules/fastify/lib/logger.js:84:11)
    at fastify (REDACTED/node_modules/.pnpm/[email protected]/node_modules/fastify/fastify.js:137:33)
    at fastify (REDACTED/node_modules/.pnpm/[email protected]/node_modules/dd-trace/packages/datadog-instrumentations/src/fastify.js:16:25)
    at fastify (REDACTED/node_modules/.pnpm/[email protected]/node_modules/dd-trace/packages/datadog-shimmer/src/shimmer.js:31:21)
  code: 'FST_ERR_LOG_LOGGER_AND_LOGGER_INSTANCE_PROVIDED',
  statusCode: 500
}

Library versions:
Fastify: 5.0.0
dd-trace: 5.24.0

@clarkenciel clarkenciel changed the title Support: Fastify 5 Support: Fastify v5 Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants