rhobs / rhobs/observability-operator

[FEATURE] Add enableFeatures field to MonitoringStack prometheusConfig

Open
#995 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
51
Forks
90
Avg merge
5d 15h
Merged PRs (30d)
22

Description

Is your feature request related to a problem?

The MonitoringStack CRD does not expose a way to enable Prometheus feature flags (e.g. --enable-feature=exemplar-storage). This prevents users from enabling exemplar storage on Prometheus instances managed by the operator.

Our use case:

We run Tempo's metrics generator which produces span-metrics (traces_spanmetrics_calls_total, traces_spanmetrics_latency_bucket) and writes them to a MonitoringStack Prometheus via remote write with send_exemplars: true. The exemplars carry trace IDs that would enable Metrics → Traces correlation in Grafana. However, the receiving Prometheus silently drops exemplars because exemplar storage is not enabled, and there is no way to enable it through the MonitoringStack API.

Describe the solution you'd like:

Add an enableFeatures field to MonitoringStack.spec.prometheusConfig, similar to the enableFeatures field on the upstream Prometheus CRD:

  apiVersion: monitoring.rhobs/v1alpha1
  kind: MonitoringStack
  spec:
    prometheusConfig:
      enableFeatures:
        - exemplar-storage

This would propagate as --enable-feature=exemplar-storage on the Prometheus container args.

Alternatives you've considered

  • Manually patching the Prometheus StatefulSet — overwritten on operator reconciliation
  • Using enableOtlpHttpReceiver — unclear if this enables exemplar storage as a side effect. Also this would require us to configure OTEL collector to send exemplar data on the OTLP protocol to prometheus.

Additional context

  • COO version: v1.3.1 (latest stable)
  • OpenShift: 4.18
  • Prometheus version shipped: ~2.55.1
  • The enableRemoteWriteReceiver and enableOtlpHttpReceiver fields already exist as feature-specific booleans — enableFeatures would be a more generic solution covering current and future needs

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the MonitoringStack.spec.prometheusConfig handling and the existing enableRemoteWriteReceiver and enableOtlpHttpReceiver fields. Trace how those settings reach the Prometheus container arguments, then identify the CRD and reconciliation tests covering them. Done means enableFeatures is accepted in the MonitoringStack API and produces the corresponding --enable-feature arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes, prometheus
Domain
infrastructure, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.