---
title: Charmhub | Deploy Pyroscope Coordinator K8S using Charmhub - The Open Operator
  Collection
description: Deploy the latest version of Pyroscope Coordinator K8S as a Kubernetes
  Operator on any cloud.
url: https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling
---

# Pyroscope Coordinator K8S

[Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

* [Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")

Platform:

1.18/stable 98

```
juju deploy pyroscope-coordinator-k8s --channel 1.18/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

[Toggle side navigation](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#drawer)

## charms.pyroscope\_coordinator\_k8s.v0.profiling

* [*Docstrings*Docstrings](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling)
  [*Code*Source code](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling/source-code)
* + Download

    Fetch library

    ```
    charmcraft fetch-lib charms.pyroscope_coordinator_k8s.v0.profiling
    ```

    [Download profiling.py](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling/download)
  + *Last updated* 03 Sep 2025
  + *Revision* Library version 0.5

Profiling integration endpoint wrappers.

Install with:

> $ charmcraft fetch-lib charms.pyroscope\_coordinator\_k8s.v0.profiling

##### Requirer usage

Update charmcraft.yaml to add a `profiling` requirer endpoint

```
requires:
  profiling:
    interface: profiling
    optional: true
    description: Send profiles to a profiling backend (Pyroscope).
```

Then update your charm code:

```
from charms.pyroscope_coordinator_k8s.v0.profiling import ProfilingEndpointRequirer, Endpoint
...
class MyCharm(ops.CharmBase):
        def __init__(self, ...):
            ...
            self._profiling = ProfilingEndpointRequirer(self.model.relations['profiling'])  # has to match the endpoint name declared in charmcraft.yaml

        @property
        def profiling_endpoints(self) -> List[Endpoint]:
            "The profiling backend endpoints we receive over the 'profiling' interface."
            return self._profiling.get_endpoints()

        def configure_profiling(self):
            "Configure your application to send profiles to the provided endpoint."
            for endpoint in self.profiling_endpoints:
                self.add_profiling_endpoint(url=endpoint.otlp_grpc, insecure=endpoint.insecure)
```

##### Provider usage

Update charmcraft.yaml to add a `profiling` provider endpoint

```
provides:
  profiling:
    interface: profiling
    optional: true
    description: Receive otel profiles.
```

Then update your charm code:

```
from charms.pyroscope_coordinator_k8s.v0.profiling import ProfilingEndpointProvider
...
class MyCharm(ops.CharmBase):
        def __init__(self, ...):
            ...
            self._profiling = ProfilingEndpointProvider(self.model.relations['profiling'], self.application)

        def publish_profiling_endpoint(self):
            "Update all our `profiling` relations, advertising this unit's ingestion endpoint url."
            self._profiling.publish_endpoint(f"{socket.getfqdn()}:1239", insecure=True)
```

---

Index

* [class Endpoint](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#endpoint)
* [class ProfilingAppDatabagModel](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#profilingappdatabagmodel)
* [class ProfilingEndpointProvider](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#profilingendpointprovider)
* + [def \_\_init\_\_(
    self,
    relations,
    app)](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#profilingendpointprovider-__init__)
* + [def publish\_endpoint(
    self,
    otlp\_grpc\_endpoint,
    insecure)](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#profilingendpointprovider-publish_endpoint)
* [class ProfilingEndpointRequirer](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#profilingendpointrequirer)
* + [def \_\_init\_\_(
    self,
    relations)](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#profilingendpointrequirer-__init__)
* + [def get\_endpoints(
    self)](https://charmhub.io/pyroscope-coordinator-k8s/libraries/profiling#profilingendpointrequirer-get_endpoints)

#### class Endpoint

Description

Profiling endpoint. None

#### class ProfilingAppDatabagModel

Description

Application databag model for the profiling interface. None

#### class ProfilingEndpointProvider

Description

Wraps a profiling provider endpoint. None

Methods

ProfilingEndpointProvider.
\_\_init\_\_(

*self*

,
relations

,
app
)

ProfilingEndpointProvider.
publish\_endpoint(

*self*

,
otlp\_grpc\_endpoint: str

,
insecure: bool
)

Description

Publish profiling ingestion endpoints to all relations. None

#### class ProfilingEndpointRequirer

Description

Wraps a profiling requirer endpoint. None

Methods

ProfilingEndpointRequirer.
\_\_init\_\_(

*self*

,
relations
)

ProfilingEndpointRequirer.
get\_endpoints(

*self*
)

Description

Obtain the profiling endpoints from all relations. None
