Description
The purpose and use-cases of the new component
This component is a reprisal of the existing target allocator command under opentelemetry-operator.
The goal of this component is to analyze various Prometheus metric sources and split job allocations between existing collectors.
In the operator, this command is used to find all Prometheus endpoints exposed with Prometheus Operator CRDs and split their jobs according to a strategy that fits best the cluster topology and the type of load to expect.
While this component is currently active under the operator, I would like it to be considered as a collector extension.
I believe this will fit better in scenarios where the operator is not used, but a Kubernetes environment is in play.
I also believe this can be leveraged to check for other sources of Prometheus metrics.
Example configuration for the component
extensions:
target-allocator:
collector_selector:
matchlabels:
app.kubernetes.io/instance: default.test
app.kubernetes.io/managed-by: opentelemetry-operator
prometheus_cr:
pod_monitor_selector:
matchlabels:
release: test
service_monitor_selector:
matchlabels:
release: test
config:
scrape_configs:
- job_name: prometheus
static_configs:
- targets: ["prom.domain:9001", "prom.domain:9002", "prom.domain:9003"]
labels:
my: label
This example shows an extension target-allocator with a kubernetes selector of OpenTelemetry Collector instances filtered on specific labels.
For any Prometheus custom resources, the target-allocator will find all usage of the PodMonitor and ServiceMonitor CRDs under the release: test
label. It also has static configs going to 3 different Prometheus endpoints.
Telemetry data types supported
metrics
Code Owner(s)
atoulme
Sponsor (optional)
Additional context
No response