Skip to content

Demangle not working on ebpf with rust code #3982

Open
@Sh4d1

Description

@Sh4d1

Hello! I'm trying to setup ebpf profiles. Currently, I'm running grafana alloy with the following configuration:

discovery.kubernetes "all_pods" {
  role = "pod"
  selectors {
    field = "spec.nodeName=" + sys.env("HOSTNAME")
    role = "pod"
  }
}

discovery.relabel "local_pods" {
  targets = discovery.kubernetes.all_pods.targets
  rule {
    action = "drop"
    regex = "Succeeded|Failed"
    source_labels = ["__meta_kubernetes_pod_phase"]
  }
  rule {
    action = "replace"
    regex = "(.*)@(.*)"
    replacement = "ebpf/${1}/${2}"
    separator = "@"
    source_labels = ["__meta_kubernetes_namespace", "__meta_kubernetes_pod_container_name"]
    target_label = "service_name"
  }
}
pyroscope.ebpf "local_pods" {
  forward_to = [ pyroscope.write.endpoint.receiver ]
  targets = discovery.relabel.local_pods.output
  
  demangle = "full"
  python_enabled = false
}

pyroscope.write "endpoint" {
  endpoint {
    url = "http://pyroscope.monitoring:4040"
  }
}

This works, however my function names are still mangled, as you can see in the image:

Image

I'm running alloy 1.7.1 and pyroscope 0.12, both on kubernetes.
Posting it here since it seems the demangle happens in a package here. Let me know if you need anything else!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions