Comments (5)
basically what happens is that Yarn + pnpm
is adding a custom loader for its cache under the hood. To do soo it sets the environment variable NODE_OPTIONS
to a certain value.
The getting started guide assumes this var is not set so the npm scripts
"dev": "NODE_OPTIONS=--require=elastic-apm-node/start-next.js next dev"
overriding its value and making the yarn + pnpm
loader unavailable.
You can change the script to append the required value into node options. This is an example
"dev": "NODE_OPTIONS=\"$NODE_OPTIONS --require=elastic-apm-node/start\" node next dev"
This will maintain reference to the required loaders and append the agent start script at the end.
Cheers!
from apm-agent-nodejs.
Hello @david-luna,
I have tried your suggestion and it did work in this repository with the nextjs example.
When it came to try it with my project, I had this error :
Error: Qualified path resolution failed: we looked for the following paths, but none could be accessed.
Source path: /workspace/next
Not found: /workspace/next
it seem it wasn't able to start next. I change your suggestion to
"dev": "NODE_OPTIONS=\"$NODE_OPTIONS --require=elastic-apm-node/start-next.js\" next dev "
This seem to be working. do you see any issue with the change I made ?
from apm-agent-nodejs.
do you see any issue with the change I made ?
Maybe we weren't using the same yarn + pnpm
version and the resolution differs a little bit. It is okay to use the extension.
from apm-agent-nodejs.
As per your last comment in assume the issue is fixed. Should I proceed to close it?
from apm-agent-nodejs.
Yes, thank you
from apm-agent-nodejs.
Related Issues (20)
- edge "test-nightly" failing after kafka/zookeeper addition
- TAV failing for `[email protected]` HOT 4
- Agent doesn't capture uncaught exceptions or unhandled rejections HOT 11
- Request body is logged even with `captureBody: off` HOT 17
- undici instrumentation can add duplicate trace-context headers, which can break Elasticsearch HOT 2
- release fails in make-distribution.sh step
- KafkaJS instrumentation throw exception on "tombstone message" HOT 2
- including parsed "cookie" HTTP request header in ingest can lead to mapping conflicts HOT 2
- Elastic APM Agent Node arbitrary code Injection due to improper sanitization of the timezone parameter HOT 2
- APM Server transport error (ERR_SOCKET_TIMEOUT): Socket timeout HOT 5
- Lambda "nodejs20.x" is out, our published Lambda layers should say they support it HOT 2
- bitrot updates HOT 1
- [Question] Support bullmq HOT 7
- make docker image(s) multi-platform and include linux/arm64 HOT 4
- opentelemetry-bridge should use the ELASTIC_APM_API_KEY HOT 1
- Any plans to support hyper-express please? HOT 4
- Support for Azure OpenAI
- nightly test with Node.js v23 failing in `elasticsearch` module
- add support for synchronous gauge to OTel Bridge metrics support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apm-agent-nodejs.