[pinot-server] Add consuming-segment decoder observability - #19529
[pinot-server] Add consuming-segment decoder observability#19529anuragrai16 wants to merge 1 commit into
Conversation
Expose the concrete StreamMessageDecoder class of a consuming realtime segment for debugging decode issues: - New CONSUMING_SEGMENT_DECODER server gauge, tagged by table/topic/ partition/decoder class, emitted alongside LLC_PARTITION_CONSUMING and removed on segment offload. - Persist the decoder class in segment metadata (custom.decoder.class) and surface decoderClassName via the consuming-segment debug APIs. - Add a JMX->Prometheus scrape rule for the new gauge. Backward compatible: SPI addition is a nullable default method, the DTO field is nullable with ignore-unknown, segment metadata is additive, and the scrape rule is anchored to avoid shadowing existing rules.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19529 +/- ##
============================================
+ Coverage 67.70% 67.74% +0.03%
Complexity 1450 1450
============================================
Files 3490 3491 +1
Lines 224998 225043 +45
Branches 35523 35530 +7
============================================
+ Hits 152335 152453 +118
+ Misses 60618 60556 -62
+ Partials 12045 12034 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
If I understand right, you are emitting a metric (of value 1) with the current decoder class name. Is this not an overkill? Can you just log the decoder class name? Even log at some regular cadence if needed? I saw a proposal float by for pinot internal table. Perhaps you could add a row/column in that table? |
Hi @mcvsubbu - Thanks for checking the diff. We're trying to migrate 1000s of table decoders on live production tables, each of which consumes from Kafka topics upto 256 partitions, while Pinot has no observability into what decoder was used for a mutable segment, or being used for a consuming segment. A log is ephemeral and not a reliable way to solve this problem. At the cost/overkill part, we are just emitting one additional gauge per consuming segment, using the existing setValueOfGauge register-once path, no new gauge objects created per tick, just an AtomicLong.set(1). The overhead is negligible compared to what each consuming segment already emits. As for the proposal for Pinot internal table, it is a larger effort that's still in design. This gauge is a minimal, backward-compatible addition (constant 1 emitted alongside the already-existing |
Every metric you add is an overhead. Especially ones that emit a 0 or 1. We can probably remove the consuming metric as well, because we now have a metric that shows the delay in consumption. That being said, here are two alternatives:
|
Expose the concrete
StreamMessageDecoderclass of a consuming realtime segment for debugging decode issues:New
CONSUMING_SEGMENT_DECODERserver gauge, tagged by table/topic/ partition/decoder class, emitted alongsideLLC_PARTITION_CONSUMINGand removed on segment offload.Persist the decoder class in segment metadata (custom.decoder.class) and surface decoderClassName via the consuming-segment debug APIs.
Add a JMX->Prometheus scrape rule for the new gauge.
Backward compatible: SPI addition is a nullable default method, the DTO field is nullable with ignore-unknown, segment metadata is additive, and the scrape rule is anchored to avoid shadowing existing rules.