coroot / coroot-node-agent

A Prometheus exporter based on eBPF that gathers comprehensive container metrics
https://coroot.com/docs/metrics/node-agent
Apache License 2.0
294 stars 54 forks source link

How to disable profiling #61

Closed KKulishov closed 5 months ago

KKulishov commented 5 months ago

Hello!

I see in the code

profiling.Start() defer profiling.Stop() Is it possible to add a condition that specifies whether to enable or not profiling?

apetruhin commented 5 months ago

@KKulishov, It won't start if no PROFILES_ENDPOINT environment variable is configured. https://github.com/coroot/coroot-node-agent/blob/4a80e36036cc21044461809c9c62a240defeb603/profiling/profiling.go#L50

KKulishov commented 5 months ago

Thank you