Shipping MEM and CPU usage/metrics to the otel collector and visualize using grafana? #14573
Unanswered
dev-samples
asked this question in
Q&A
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.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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
HostMetricswhich is for the host my app runs on) and visualize the usage in grafana.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:
https://opentelemetry.io/docs/languages/js/exporters/#usage-with-nodejs
https://opentelemetry.io/docs/languages/js/exporters/#prometheus-dependencies
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
v8js_memory*metrics but nothing related to CPU.So:
PrometheusExporterinstead?Any input is very appreciated!
Beta Was this translation helpful? Give feedback.
All reactions