From 73253f7a5bba658a7111e37ae70a32a23a35de18 Mon Sep 17 00:00:00 2001 From: Tolya Korniltsev Date: Thu, 1 Feb 2024 02:10:52 +0700 Subject: [PATCH] docs(pyroscope.ebpf): rewrite container id sections, include PID label (#6265) * docs(pyroscope.ebpf): rewrite container id sections, include PID label * Update docs/sources/flow/reference/components/pyroscope.ebpf.md Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --------- Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com> --- .../reference/components/pyroscope.ebpf.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/docs/sources/flow/reference/components/pyroscope.ebpf.md b/docs/sources/flow/reference/components/pyroscope.ebpf.md index 2ec8a7fa2199..590ad574baf9 100644 --- a/docs/sources/flow/reference/components/pyroscope.ebpf.md +++ b/docs/sources/flow/reference/components/pyroscope.ebpf.md @@ -95,16 +95,20 @@ can help you pin down a profiling target. | `__name__` | pyroscope metric name. Defaults to `process_cpu`. | | `__container_id__` | The container ID derived from target. | -### Container ID +### Targets -Each collected stack trace is then associated with a specified target from the targets list, determined by a -container ID. This association process involves checking the `__container_id__`, `__meta_docker_container_id`, -and `__meta_kubernetes_pod_container_id` labels of a target against the `/proc/{pid}/cgroup` of a process. +One of the following special labels _must_ be included in each target of `targets` and the label must correspond to the container or process that is profiled: -If a corresponding container ID is found, the stack traces are aggregated per target based on the container ID. -If a container ID is not found, the stack trace is associated with a `default_target`. +* `__container_id__`: The container ID. +* `__meta_docker_container_id`: The ID of the Docker container. +* `__meta_kubernetes_pod_container_id`: The ID of the Kubernetes pod container. +* `__process_pid__` : The process ID. -Any stack traces not associated with a listed target are ignored. +Each process is then associated with a specified target from the targets list, determined by a container ID or process PID. + +If a process's container ID matches a target's container ID label, the stack traces are aggregated per target based on the container ID. +If a process's PID matches a target's process PID label, the stack traces are aggregated per target based on the process PID. +Otherwise the process is not profiled. ### Service name