Marton Greber created KUDU-3774:
-----------------------------------
Summary: MetricFilters: entity_types and entity_ids filters use
substring matching instead of exact matching
Key: KUDU-3774
URL: https://issues.apache.org/jira/browse/KUDU-3774
Project: Kudu
Issue Type: Bug
Reporter: Marton Greber
When filtering metrics via the ?types= or ?ids= query parameters (on both
/metrics and /metrics_prometheus endpoints), the underlying MatchName()
function performs a case-insensitive substring match rather than an exact
match.
This causes unintended cross-matching between similar entity type names.
For example:
?types=table
will return metrics for both "table" and "tablet" entities, since "table"
is a substring of "tablet".
Substring matching is intentional and correct for the ?metrics= parameter
(where partial name matching is a useful feature). However, for entity_types
and entity_ids the values come from a fixed known set, and users expect
exact/prefix semantics.
Fix: use exact (or at minimum prefix) matching in MatchName() when applied
to entity_types and entity_ids filters, while preserving substring semantics
for entity_metrics.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)