Skip to content

Commit

Permalink
Clarify custom receiver implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
chrkl committed Apr 26, 2024
1 parent 10c6f3b commit fe7ea15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/contributor/arch/011-kymastatsmetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ This record describes a way to integrate similar functionality to the Telemetry
An OpenTelemetry Collector receiver with similar scope as kube-state-metrics is the [Kubernetes Cluster Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8sclusterreceiver). However, this receiver does not support monitoring custom resources.
Another available source to monitor changes of arbitrary Kubernetes objects is the [Kubernetes Objects Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8sobjectsreceiver). This receiver produces only logs and no metrics.

The OpenTelemetry Collector provides interfaces for enhancements by implementing custom receiver plugins. The OpenTelemetry project provides [documentation](https://opentelemetry.io/docs/collector/building/receiver/) on implementing a custom receiver and adding it to a custom distribution of the Collector.

## Decision

Due to the restrictions of available telemetry resources for Kubernetes resources, building a custom receiver is the most suitable option.

### Extended MetricPipeline API

Module status metrics can be activated as a new input in the MetricPipeline CRD. Users can select the Kyma modules of interest by giving a module list. An empty list will include metrics of all active modules.
Expand Down Expand Up @@ -46,14 +50,14 @@ spec:
value: http://example.com:4317
```
Enabling the Kyma input will enable a custom metrics receiver, called `kymastats`, in the telemetry-metric-gateway that produces metrics for the module state and status conditions.
Enabling the Kyma input will enable a custom metrics receiver, called `kymastats`, in the telemetry-metric-gateway that produces metrics for the module state and status conditions.
The receiver configuration will follow the shown example.

```yaml
receivers:
kymastats:
k8s_cluster:
auth_type: serviceAccount
auth_type: serviceAccount
collection_interval: 30s
api_groups:
- operator.kyma-project.io
Expand Down

0 comments on commit fe7ea15

Please sign in to comment.