Open tpaschalis opened 1 year ago
The old pyroscope agent was very simple in its collection config.
pyroscope ebpf --pid -1 --application-name $appname --server-address $serverIP:$port
Definitely would like to have a similar example from the grafana-agent to make the transition easier to profile the VM's instead of just Docker/Kubernetes, though luckily the old agent can still send the metrics to grafana-pyroscope.
The old pyroscope agent was very simple in its collection config.
pyroscope ebpf --pid -1 --application-name $appname --server-address $serverIP:$port
Definitely would like to have a similar example from the grafana-agent to make the transition easier to profile the VM's instead of just Docker/Kubernetes, though luckily the old agent can still send the metrics to grafana-pyroscope.
After more testing, the below river config was working fine for my use case. apologies for the previous comment.
pyroscope.ebpf "instance" {
forward_to = [ pyroscope.write.endpoint.receiver ]
targets_only = false
default_target = {"service_name" = "$SERVICE_NAME"}
}
pyroscope.write "endpoint" {
endpoint {
url = "$URL:$PORT"
}
}
This issue has not had any activity in the past 30 days, so the needs-attention
label has been added to it.
If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue.
The needs-attention
label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!
The old pyroscope agent was very simple in its collection config.
pyroscope ebpf --pid -1 --application-name $appname --server-address $serverIP:$port
Definitely would like to have a similar example from the grafana-agent to make the transition easier to profile the VM's instead of just Docker/Kubernetes, though luckily the old agent can still send the metrics to grafana-pyroscope.After more testing, the below river config was working fine for my use case. apologies for the previous comment.
pyroscope.ebpf "instance" { forward_to = [ pyroscope.write.endpoint.receiver ] targets_only = false default_target = {"service_name" = "$SERVICE_NAME"} } pyroscope.write "endpoint" { endpoint { url = "$URL:$PORT" } }
Can you elaborate this snippet? Like what is service_name?
Also targets
is a required field according to Alloy documentation... It's missing in your snippet. May be u can explain a bit?
The old pyroscope agent was very simple in its collection config.
pyroscope ebpf --pid -1 --application-name $appname --server-address $serverIP:$port
Definitely would like to have a similar example from the grafana-agent to make the transition easier to profile the VM's instead of just Docker/Kubernetes, though luckily the old agent can still send the metrics to grafana-pyroscope.After more testing, the below river config was working fine for my use case. apologies for the previous comment.
pyroscope.ebpf "instance" { forward_to = [ pyroscope.write.endpoint.receiver ] targets_only = false default_target = {"service_name" = "$SERVICE_NAME"} } pyroscope.write "endpoint" { endpoint { url = "$URL:$PORT" } }
Can you elaborate this snippet? Like what is service_name?
Also
targets
is a required field according to Alloy documentation... It's missing in your snippet. May be u can explain a bit?
service_name is just a label that can be used to differentiate between profiles. [example; "service_name" = "web-server"] This was for the river config from grafana-agent-flow, not sure if this translates to alloy configs.
Currently, the documentation page of pyroscope.ebpf provides examples for Docker and Kubernetes-based profile collection.
One user in the public Slack was confused as to how to collect profiles locally from a VM.
I'm guessing it's as easy as
targets = [{"__address__" = "localhost", "instance" = "one"}]
, but wanted to a) verify that's the case and b) add this as an example to get people up and running