Prometheus integration uses hard coded value for M3DB namespace
Currently the Prometheus integration defaults to a metrics namespace for the coordinator to emit data to. This is not configurable thus requiring the user to strictly stick a generic namespace. To allow a bit more flexibility using configuration.
coordinator:
listenAddress: 0.0.0.0:7201
metrics:
prometheus:
handlerPath: /metrics
sanitization: prometheus
samplingRate: 1.0
extended: detailed
dbNamespace: foo
@nikunjgit would mind commenting on this feature addition to the coordinator?
We should definitely have this. However, maybe figure out where to put this field in the config ? Eg: do you want it within coordinator: section or db: section ?
@nikunjgit fyi - a database has a 1-many relationship with namespaces, the config for this lives in KV.
The ingest path needs to pick which cluster/namespace to write to based on retention policies. This makes sense to be configurable within the coordinator.
For the query path, the following needs to happen:
(a) something that resolves query -> [](id, []retention policy)
(b) per id, going from []retention policy -> retention policy
Once the index supports stored fields, (a) will be part of the index. Till that time, the coordinator has to allow users to specify which namespace to hit per query. (b) will always need to be done by the coordinator.
Commit addresses the issue.