Coder Social home page Coder Social logo

meteor-elastic-apm's Introduction

meteor-elastic-apm

Performance Monitoring for Meteor based on Elastic APM

Meteor Elastic APM screenshot

what it monitors

  1. Meteor methods - detailed stack trace of what happened insine methods
  2. Meteor pub/sub - tracks publications response time
  3. Meteor pub/sub - operations, how many documents were added, updated, removed
  4. Async ops inside methods and pubs, for example http requests
  5. All Incoming and outcoming TCP requests, usefull if you have REST API
  6. Exception handling

more screenshots

https://github.com/kschingiz/meteor-elastic-apm/blob/master/assets/

project status - Production Ready

getting started

  1. Install and configure elasticsearch - https://www.elastic.co/downloads/elasticsearch
  2. Install and configure Kibana - https://www.elastic.co/downloads/kibana
  3. Install and configure elastic APM server - https://www.elastic.co/downloads/apm

Then

meteor add kschingiz:meteor-elastic-apm

Maybe you will need to also install

meteor add http mongo-livequery

Then somewhere in your server code, Elastic documentation stays that Agent.start should be executed before anything else, and should be at the very top of your code

import Agent from "meteor/kschingiz:meteor-elastic-apm";

const options = {
  serviceName: "meteor-demo-app"
};
Agent.start(options);

Complete list of Agent options

Kibana APM with Meteor with MUP

Meteor Up is a production quality Meteor app deployment tool. We expect you already has up and running Meteor app on server deployed with MUP.

  1. mup ssh
  2. wget https://raw.githubusercontent.com/elastic/apm-server/master/apm-server.yml && cp apm-server.yml /etc/apm-server/apm-server.yml
  3. Now you need to edit /etc/apm-server/apm-server.yml, at least you need to add you elastic search url under output.elasticsearch. When you finish just close this terminal
  4. Now we need to update mup.js file to: a) Install apm-server in app container b) Pass apm-server config file into our app container c) Start it everytime after deploy
{
  app: {
    ...
    volumes: {
      '/etc/apm-server/apm-server.yml': '/etc/apm-server/apm-server.yml'
    },
    docker: {
        ...
        buildInstructions: [
        // https://www.elastic.co/guide/en/apm/server/current/setup-repositories.html
        'RUN apt-get install wget -y',
        'RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -',
        'RUN apt-get install apt-transport-https',
        'RUN echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-6.x.list',
        'RUN apt-get update && apt-get install apm-server -y',
        'RUN update-rc.d apm-server defaults 95 10'
        ]
    }
    ...
  },
  ...
  hooks: {
    // Run apm-server
    'post.deploy'(api) {
      return api.runSSHCommand(
        api.getConfig().servers.one,
        'docker exec development service apm-server start'
      );
    }
  },
}

demo app

https://github.com/kschingiz/demo-meteor-elastic-apm

API

Agent is based on elastic/apm-agent-nodejs and fully supports all of it's features https://github.com/elastic/apm-agent-nodejs

contributions

All contributions are welcome, Let's make the better APM together!

meteor-elastic-apm's People

Contributors

kschingiz avatar hazemkhaled avatar alexnault avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.