Charmed Parca solution architecture

(WIP!)

Charmed Parca is a solution to deploy and operate the Parca continuous profiling software, part of the Canonical Observability Stack.

Profiles, like metrics, are natively exposed by certain applications. We call them natively instrumented applications. These applications serve a pprof endpoint that can be scraped by parca out of the box. Charmed Parca’s essential component is the parca-k8s charm, that runs the “Parca Server”, responsible for ingesting, storing and processing profile data. It can also directly scrape pprof endpoints. Profiles, much like metrics, can be pushed into parca or scraped (‘pulled’) by it.

Depending on the substrate you are working with and whether the application you want to profile is natively instrumented or not, the Charmed Parca components you need will vary.

Solution component matrix

substrate\instrumentation native auto
machine charm parca-k8s parca-agent
kubernetes charm parca-k8s WIP
uncharmed parca-k8s + parca-scrape-target WIP

Parca and charmed applications on k8s clouds

Natively instrumented applications

Charms such as zinc-k8s wrap Zinc’s own instrumentation so that you can relate parca-k8s to zinc and have parca scrape Zinc’s pprof endpoint to collect profiles. But k8s networking is in the way, so typically you will have COS deployed on its own k8s model, and somewhere else the application that you want to scrape.

Autoinstrumentation

We are in the process of exploring solutions for autoinstrumenting kubernetes workloads to expose profiling data.

Parca and charmed applications on machine clouds

Natively instrumented applications

If the application has native support for continuous profiling, it will probably serve a pprof endpoint you can wrap with charm code and use to integrate with parca-k8s directly over the parca_scrape interface.

See:

Autoinstrumentation

If the kernel supports eBPF probes, you can deploy the parca-agent subordinate to start collecting profiles from the principal’s workloads.

See:

Parca and uncharmed applications

If you have an uncharmed application exposing a pprof endpoint, you can use the parca-scrape-target charm to configure parca to scrape that endpoint.

See:

Note about the otel-collector and cross-model relations

In the 25.04 cycle, we plan to release an otel-collector charm to fulfill a role similar to that of the grafana-agent (k8s and machine) charm, that is, proxy all cross-model telemetry flows. For now, the only way to scrape cross-model is to integrate directly and make sure your network connectivity allows parca to scrape the target’s endpoints.

2 Likes