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';
Agent.start(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.
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
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
Glad to see another option! Good luck on making this work.
Before I even dive into it, I would recommend that agent start should be automatic if the package is included. In the same way that Kadira makes that currently.
Yes, I am using official meteor-apm-client as a template, because it has +20 commites with bug fixes.
I got your point, you mean Kadira server writing directly to elastic? No, I think it will be too complicated, and the main reason why I am developing this package is to throw out Kadira, so Kadira server will not be used anyway.
No, because Elastic APM has some specific features that Kadira doesn’t support. We can’t easily switch between these APMs.
Now I am working to fully copy the main Kadira functions and metrics, but the development is going slow. Soo please be patient I will release the first production version as soon as possible.
Hmm - but the data is being generated on the server where the application runs, doesn’t it? I thought it can be easy to just store it in a database and then build some kind of UI to visualize it.
That’s great that you’re working on that @kschingiz. You should also check out Monti APM which is being actively developed.
One thing that would be really cool to work into your design of your agent from the start would be the idea of different providers. So maybe the existing Kadira server could be one, your new solution with Elastic could be another and then others could come along and add theirs in the future. It would be really useful if it could send different data to different providers too, so maybe client errors to Sentry and server errors and performance metrics to Elastic.
@marklynch That’s a great idea, I was doing something like you mean in other repository
It supports multiple senders, can be easily extended to support new one, my example was with graphite apm
But the project was abandoned, because I want to complete with elastic apm.
Maybe I will do something you said in future versions.
That’s great that we have MontiAPM based on Kadira, but I want these kind of tools in open source world.
I don’t understand you, you mean to build some new custom UI that will visualize the saved data? Why do we need this? It will be easier to take some open source APM server and integrate it with meteor app.
Great to see alternatives rising up. Will definitely follow your work. Since the ELK stack is a quite common setup I like the idea of building on top of those tools!
I would very much like to replace my Kadira installation with the elastic-stack just because it’s monitoring support seems to be so much more flexible when it comes to other things than Meteor itself.
I know you’ve listed what this package monitors, but could you also provide a list (or a todo-list) of features Kadira has but this stack does not support as of now?
Btw. I like the fact you added http-request monitoring. Something which is a reason for me to switch right away.
Thanks a lot for your feedback. I am now testing this package in my test projects, when I will be sure that it’s production ready I will release it with detailed documentation and comparison with Kadira.
For now I can say that:
Kadira has more convenient oplog operations graph than elastic apm
Kadira CAN count CPU, Sessions and Memory usage, my package can’t
Kadira CAN NOT monitor all outcoming requests, only which are done using HTTP.call. My package monitors ALL outcoming requets
Kadira CAN catch client side exceptions, Elastic-apm only server side (TO-DO)
Elastic-apm CAN NOT show detailed information in spans, f.e. I can only record that some document has been inserted into MongoDB but APM can’t show it’s properties. (Elastic says that in future they will fix this)
Kadira crashes when you have +5GB database size (my case, I have to clear db every day), Elastic can handle easily much more data than Kadira.
Elastic-APM can’t monitor outcoming emals, I am now thinking how to do it more generic as I did with outcoming HTTP
I can’t do 1. and 2. because I don’t know yet how to show transactions in convenient time-series graph (Not a priority now, I will ask Elastic how to do this in future)
I will be happy if you help with testing and give me a feedback of how it works with your project. As I said before: Let’s make better APM together.
Thanks!
Yes, I have seen this topic. Thanks for the reference. I will learn the source code and adapt its improvements to my package later. Now I am thinking just to release the production ready package
That’s great Thanks for your help! I think we are ready to release it as a production ready, because I didn’t have any exceptions or errors in my test projects. Tomorrow I will publish test projects if you want to try it.
Just FYI I had written a NewRelic package for Meteor and we’re poised to switch to Elastic APM due to the NR subscription costs, so it’s likely I’ll be able to help soon on this project.