Traces | Metrics | App Logs | Custom Logs | Profiling |
---|---|---|---|---|
- | - |
Prerequisites
- To monitor APM data on dashboard, Middleware Host agent needs to be installed.
- You can refer this demo project to refer use cases of APM.
Step 1 : Install NPM package
Run this in your terminalStep 2 : Prepend APM script
Add these lines given below at the very start of your project.Collect Node.js specific metrics
The metrics collection starts automatically as soon as you completeStep 2
Distributed Tracing
All your APIs are auto-instrumented as soon as you completeStep 2
Add custom logs
Note for APM inside Kubernetes
If you are using APM in a Kubernetes cluster make sure to follow these 2 steps:Step 1 : Find your Middleware Service namespace
For older setup, your “mw-service” can be insidemw-agent-ns-{FIRST-5-LETTERS-OF-API-KEY}
namespace
For newer setup, we simplified the namespace name to mw-agent-ns
Step 2 : Set this ENV variable in your application deployment YAML
Please replace “NAMESPACE” with the correct value that you found from Step 1.