-
Notifications
You must be signed in to change notification settings - Fork 238
Closed
Labels
agent-nodejsMake available for APM Agents project planning.Make available for APM Agents project planning.community
Description
Fastify
When instrumenting a fastify server the captureBody option wont work, it seems that the function getContextFromRequest is not able to recover the body.
To Reproduce
Steps to reproduce the behavior:
- Start the fastify server
- Then call some endpoint (tried both with and without error)
- Check kibana APM module and look for that transaction
Expected behavior
To have the body available in the transaction.
Environment (please complete the following information)
- OS: Linux
- Node.js version: 18.14.2
- APM Server version: 7.6.1
- Agent version: 3.43.0
- Fastify version 4.13.0
How are you starting the agent? (please tick one of the boxes)
- Calling
agent.start()directly (e.g.require('elastic-apm-node').start(...)) - Requiring
elastic-apm-node/startfrom within the source code - Starting node with
-r elastic-apm-node/start
Additional context
Agent config options:
Click to expand
serverUrl: 'http://localhost:8200',
logLevel: 'trace',
verifyServerCert: false,
captureBody: 'all',
package.json dependencies:
Click to expand
"@fastify/sensible": "5.2.0",
"@fastify/swagger": "8.3.1",
"@fastify/swagger-ui": "1.5.0",
"@prisma/client": "4.10.1",
"@types/pg": "8.6.6",
"elastic-apm-node": "^3.43.0",
"fastify": "4.13.0",
"fastify-plugin": "4.5.0",
"fluent-json-schema": "4.1.0",
"pg": "8.10.0"
Metadata
Metadata
Assignees
Labels
agent-nodejsMake available for APM Agents project planning.Make available for APM Agents project planning.community
