fpapon commented on code in PR #337:
URL: https://github.com/apache/karaf-decanter/pull/337#discussion_r1853962036
##########
collector/prometheus/src/main/java/org/apache/karaf/decanter/collector/prometheus/PrometheusCollector.java:
##########
@@ -71,28 +73,39 @@ public void activate(Dictionary<String, Object> properties)
throws Exception {
public void run() {
try {
URLConnection connection = prometheusURL.openConnection();
- Map<String, Object> data = new HashMap<>();
- data.put("type", "prometheus");
+ String topic = (properties.get(EventConstants.EVENT_TOPIC) !=
null) ? (String) properties.get(EventConstants.EVENT_TOPIC) :
"decanter/collect/prometheus";
+ String type = (properties.get("type") != null) ? (String)
properties.get("type") : "prometheus";
Review Comment:
Good point, we should hardcode the type in all collectors/appenders and just
ignore the key if present in the properties file.
Thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]