apache / apache/pinot

JMX To Prom Exporter - More Inclusive Table Naming Regex

Open
#10,138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
2d 55m
Merged PRs (30d)
182

Description

# The Issue

For our company usecase, we actually use UUIDs for our table names. Ex: cfec8068-c04e-4131-8c29-1e4850b5c015_OFFLINE

However, the current JMX Prom Java agent config looks like below:

```
- pattern: "\"org.apache.pinot.common.metrics\"<>(\\w+)"
name: "pinot_controller_segmentsInErrorState_$3"
cache: true
labels:
table: "$1"
tableType: "$2"
```

`w+` unfortunately does not encapsulate the `-` in the table name, therefore causing us to lose metrics for all of these tables as it fails the regex. This in turn means we can't have proper alerts for bad segment and unavailable states.

## The Proposal

PR incoming but effectively changing all instances of `((\w+)_(\\w+)` to `(\\S+)_(\\w+)`. In this way, it will accept all non-whitespace characters as a valid name for a table. I do understand that Pinot has exceptions on using `.` in table names, but APIs will cleanse / ensure those table names are sanitized to w/e standard. Hence, if a table name is guaranteed to be clean, it should be properly exported and why I suggest the more flexible regex.

Contributor guide

Open the contributing guide

Research direction

Start by locating the JMX Prom Java agent configuration entries containing the shown segmentsInErrorState pattern and identify every matching table-name regex. Verify the current behavior with a UUID-based table name, update the relevant patterns to accept the intended non-whitespace names, and confirm that the corresponding metrics and labels are exported.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, prometheus
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.