Shipping MEM and CPU usage/metrics to the otel collector and visualize using grafana? #14573
-
|
This is a beginner question but I am trying to understand how to best instrument my application (NodeJS/NextJS) and generate CPU and memory usage for the app (not to be confused with As I understand I cannot simply do: app (some otel sdk) -> otel collector -> grafana dashboard since grafana will not allow you to create dashboard using the otel collector as data source. Instead it seems I need to do: app (some otel sdk) -> otel collector <- prometheus <- grafana dashboard So I still push to the otel collector from my app (e.g. to the /metrics endpoint) and then I can configure prometheus to scrape/pull the otel collector endpoint and grafana can then use (pull) prometheus as data source (not knowing about the otel collector). In my app I have seen at least two different ways of doing this:
I currently try option 1 above but when I go to prometheus at http://0.0.0.0:9090/query I just see a lof of So:
Any input is very appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
That is accurate. The collector is a data processor and transformer, not a datastore. It receives data, processes it and exports it. Regarding the JS data, you would have more luck asking directly in the opentelemetry-js repository. |
Beta Was this translation helpful? Give feedback.
That is accurate. The collector is a data processor and transformer, not a datastore. It receives data, processes it and exports it.
So you need to send somewhere that grafana can then read from (that can be prometheus, or any other metrics datastore).
You can obviously also not use any collector, and use the prometheus exporter available in your language's SDK to let prometheus scrape the data directly from your app.
Regarding the JS data, you would have more luck asking directly in the opentelemetry-js repository.