Closed MauriceVanVeen closed 1 year ago
@MauriceVanVeen this is a good suggestion
Do you have suggestions of what the names might be? How would you realistically tell 100 watchers apart in a meaningful way where the names are still random enough to avoid clashes?
@ripienaar, would say the random names could stay as-is (so no need to change the default), and adding the ability to explicitly set a name yourself if desired. Like the way you would manually name a durable consumer, but then setting such a name on the ephemeral consumer used by the watcher.
For example, then it would support the case where specific applications are using one/multiple watchers for a longer period of time. A recognisable name would help to identify the watchers, especially when using streams with durable consumers with explicit names combined with same/other apps also relying on KV watchers for state.
Would require some careful thinking for sure, how to detect clashes in consumer names cos that will big time mess up watcher functionality for example.
Yeah, either checking for clashes or using a custom name as a suffix Something like EGRF38JR_application_name_here
.
Using description fields would be safer of course - but I understand its not quite as handy.
I have some thoughts on watchers and they may change (under the covers, not API or functionality wise) such that this is not as much an issue.
From a monitoring point of view it would be cool if you can tell not just the application name that created the watcher but also what it's watching on.
We can now leverage metadata
to do that.
Overview
A KV watcher uses an ephemeral consumer with a random name, to make it (optionally) more recognisable in the CLI and/or graphs in Grafana, allow for setting/overwriting the KV watcher name.
The behavior is documented in ADR-8.