-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Pull mode #4
Comments
I think this is done yeah? |
I'm currently trying to implement Pyroscope into our nodeJs pods in production, and so far part of it seems to work according to the documentation. As we have a scrapper that collects this data, I'm setting it up in Pull mode, with the following setup: Pyroscope.init({
appName: 'app'
})
Pyroscope.startHeapProfiling()
router.get("/pprof/profile", Permissions.public, async (req, res) => {
try {
const p = await Pyroscope.collectCpu(0.01);
res.send(p);
} catch (e) {
console.error('Error collecting cpu', e);
res.sendStatus(500);
}
});
router.get("/pprof/heap", Permissions.public, async (req, res) => {
try {
const p = await Pyroscope.collectHeap();
res.send(p);
} catch (e) {
console.error('Error collecting memory', e);
res.sendStatus(500);
}
}); According to the docs this should be correct. The problem now is that
So, of course I thought "ah well, maybe I need to manually turn it on", which is why there is a line with
If I set it, I can then just pull the data, but I suspect that it will try launching it's own server in the meantime. Lines 258 to 270 in f0f5a77
It does not seem to respect if we are trying to use it in pure |
bump? |
i'v changed default path for memory heaps cause of scraping from grafana-agent without changing grafana-agent configuration (related to #36)
|
From nodejs side we need
The text was updated successfully, but these errors were encountered: