DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Coding
  3. Frameworks
  4. 5 Steps to MeteorJS Monitoring

5 Steps to MeteorJS Monitoring

In this quick tutorial, you'll learn how to quickly measure several key metrics from your code using npm, Node.js, and MeteorJS

Stefan Thies user avatar by
Stefan Thies
·
Mar. 18, 17 · Tutorial
Like (6)
Save
Tweet
Share
7.44K Views

Join the DZone community and get the full member experience.

Join For Free

Meteor is a full-stack JavaScript platform for developing modern web and mobile applications. It includes developer tools, WebSockets, MongoDB integration, and a package manager. Atmosphere.js is the Meteor package manager. Unfortunately, it doesn’t list many Meteor monitoring solutions. Luckily, thanks to the Meteor npm integration, it is possible to use npm packages for monitoring Meteor apps with npm based monitoring solutions, such as SPM for Node.js monitoring.  SPM for Node.js collects key Node.js metrics such as Event Loop, Garbage Collection, CPU, Memory and web services metrics. All metrics are organized in out-of-the-box charts, which can be put on additional dashboards and placed next to performance charts for other parts of the application stack and their logs for doing metric-logs correlations.

Let’s see how to use SPM for Node.js with the Meteor framework.

Step 1: Create SPM App of type „Node.js“

Step 2: Install npm packages

# install SPM agent with meteor npm integration meteor npm i spm-agent-nodejs --save

Step 3: Configure SPM for Node.js agent

# preload spm-agent-nodejs module by setting NODE_OPTIONS environment variable
export NODE_OPTIONS="-r spm-agent-nodejs“
# configure SPM agent for the SPM app by setting SPM_TOKEN environment variable
export SPM_TOKEN=YOUR_SPM_TOKEN

Step 4: Run your Meteor app

# run the meteor app as usual ..
meteor run

Step 5: Check Results in SPM
After a minute or so you should see the performance metrics such as EventLoop Latencies, Memory Usage, Garbage Collection details, and HTTP statistics of your Meteor app in SPM.

Meteor metrics in SPM for Node.js

Once you have all your Node.js metrics you can start to define alert rules and configure ChatOps integrations to be alerted about anomalies in your Meteor app.

The Meteor framework typically uses MongoDB as the database, while caching and SSL termination is often off-loaded to Nginx. If you use Meteor, MongoDB, and Nginx in your stack you may want to have MongoDB monitoring and Nginx monitoring together with Meteor monitoring to cover monitoring for your whole application stack.

Meteor (web framework) Node.js mobile app

Published at DZone with permission of Stefan Thies, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Full Lifecycle API Management Is Dead
  • What Are the Benefits of Java Module With Example
  • Monolithic First
  • Introduction to Spring Cloud Kubernetes

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: