Skip to content

Bug: DeleteSliceQoSConfig uses SliceConfig event constants in Prometheus counter labels #401

Description

@mdryaaan

📜 Description

DeleteSliceQoSConfig records two Prometheus counter metrics with incorrect event label values. At line 179, the metric is recorded with string(events.EventSliceConfigDeletionFailed) instead of string(events.EventSliceQoSConfigDeletionFailed). At line 190, it is recorded with string(events.EventSliceConfigDeleted) instead of string(events.EventSliceQoSConfigDeleted). The Kubernetes Event recorder calls on the same lines correctly use the QoSConfig-specific constants. Only the Prometheus event label is wrong, causing QoSConfig deletion metrics to be attributed to SliceConfig events in all dashboards and alerts.

👟 Reproduction steps

👟 Reproduction steps

  1. Read service/slice_qos_config_service.go:174util.RecordEvent uses events.EventSliceQoSConfigDeletionFailed (correct).
  2. Read line 179 — mf.RecordCounterMetric uses events.EventSliceConfigDeletionFailed (wrong).
  3. Read line 186 — util.RecordEvent uses events.EventSliceQoSConfigDeleted (correct).
  4. Read line 190 — mf.RecordCounterMetric uses events.EventSliceConfigDeleted (wrong).
  5. At runtime: delete a SliceQoSConfig and query kubeslice_controller_events_total — counter increments under SliceConfig event names instead of QoSConfig names.

👍 Expected behavior

Prometheus counters for SliceQoSConfig deletion carry event="EventSliceQoSConfigDeletionFailed" and event="EventSliceQoSConfigDeleted" labels respectively.

👎 Actual Behavior

SliceQoSConfig deletion increments EventSliceConfigDeletionFailed and EventSliceConfigDeleted counters. SliceQoSConfig deletions are invisible in QoS-specific metric dashboards and alerts.

🐚 Relevant log output

Version

main branch — run git describe --tags in the repo

🖥️ What operating system are you seeing the problem on?

Linux

✅ Proposed Solution

At line 179, change events.EventSliceConfigDeletionFailed to events.EventSliceQoSConfigDeletionFailed. At line 190, change events.EventSliceConfigDeleted to events.EventSliceQoSConfigDeleted.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions