Are metrics logging worth it for me? reddit / selfhosted ---------------------------------------------------------------------- NeitherManner · 2023-12-06 13:39 I mostly run my own node applications on the vps. I am not sure if setting up metrics is worth it, or is just logs from docker containers enough. What kind of metrics would be useful for me? I already can check vps system perf from hetzner. ---------------------------------------------------------------------- WideWorry · 2023-12-06 13:53 System performance and application performance are not the same. Application metrics like, processing time of function, methods, db queries. Number of requests over time etc. Number of errors, retries... Basically anything which is informative to determine how is your application is behave and detect anomalies. Here is good package for Graphana Cloud: https://github.com/valamidev/grafana-cloud-graphite ---------------------------------------------------------------------- NeitherManner · 2023-12-06 14:21 "Application metrics like, processing time of function, methods, db queries." Do I need to put some custom code to nodejs apps to get this? ---------------------------------------------------------------------- WideWorry · 2023-12-06 14:28 Yes, these need additional code and handlers. ---------------------------------------------------------------------- thekrautboy · 2023-12-06 14:48 If you dont know what metrics you would want, then you probably dont need any metrics, simple. ---------------------------------------------------------------------- RevolutionaryHumor57 · 2023-12-06 19:28 No, not really. Grafana + Prometheus gives you all metrics out of box after basic configuration. You can measure requests with ie. Traefik ---------------------------------------------------------------------- WantDollarsPlease · 2023-12-06 21:35 I don't think you can get metrics like method / db / external request duration breakdown without instrumentation. ---------------------------------------------------------------------- WideWorry · 2023-12-06 22:33 Prometheus is what our grandmas were using for metrics, we have much better tools for it nowadays. ---------------------------------------------------------------------- HighMarch · 2023-12-07 05:27 This. If you don't know what you NEED to log, then you either log everything and hope you catch what you need, or log nothing. Figure out what you WOULD log, and how it helps you diagnose things. Then start setting it up. Otherwise you're just wasting energy. ​ Oh, and OP: Don't forget that metrics are always averages. If you look at a minute's worth of metrics, it's availability averaged across sixty seconds. If you look at performance on the hourly scale, it's uptime over an hour, averaged. Nearly every performance monitoring tool does this. I point this out as I've discovered some people don't get this, and forget that a 3-5 second outage can break an application stack, and barely show up in performance graphs if not tuned correctly. ---------------------------------------------------------------------- DivineImplosion · 2023-12-07 19:52 Would love to know what kind of tools you would recommend instead of prometheus. ---------------------------------------------------------------------- WideWorry · 2023-12-07 20:10 For application metrics anything which is push based, there very big list of protocols or solutions. Graphite, StatD, DogStatD(from Datadog)...