Skip to content

Commit

Permalink
docs(pyroscope.ebpf): rewrite container id sections, include PID label (
Browse files Browse the repository at this point in the history
#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>
  • Loading branch information
korniltsev and clayton-cornell authored Jan 31, 2024
1 parent 3e1c17c commit 73253f7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions docs/sources/flow/reference/components/pyroscope.ebpf.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 73253f7

Please sign in to comment.