Skip to content

fix: Remove duplicated metric from Kafka producer - #18614

Merged
benclive merged 1 commit into
mainfrom
benclive/remove-duplicate-metric-kafka
Jul 28, 2025
Merged

fix: Remove duplicated metric from Kafka producer#18614
benclive merged 1 commit into
mainfrom
benclive/remove-duplicate-metric-kafka

Conversation

@benclive

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Removes the loki_kafka_client_buffered_produce_bytes metric from Loki's Kafka producer code.

  • The metric tracks the current number of bytes buffered in the client. It stays fairly constant over time
  • A metric of the same name is being produced by the Kafka client directly after the latest update.
  • The new metric is calling exactly the same method as our custom one (client.BufferedProduceBytes() @ vendor/github.com/twmb/franz-go/plugin/kprom/kprom.go)
  • The only difference is that the new metric is a Gauge and the old metric is a Summary. However, a quick search of deployment_tools shows we aren't using this metric anywhere in our dashboards so I don't think change is important.
@benclive
benclive requested a review from a team as a code owner July 28, 2025 14:13
@chaudum chaudum added type/bug Somehing is not working as expected backport k265 labels Jul 28, 2025
@benclive
benclive enabled auto-merge (squash) July 28, 2025 14:19
@benclive
benclive merged commit a67a460 into main Jul 28, 2025
68 checks passed
@benclive
benclive deleted the benclive/remove-duplicate-metric-kafka branch July 28, 2025 14:20
loki-gh-app Bot pushed a commit that referenced this pull request Jul 28, 2025
felix0102 pushed a commit to felix0102/loki that referenced this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport k265 size/M type/bug Somehing is not working as expected

2 participants