You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/10/10 10:00:13 UTC

[GitHub] [inlong] Keylchen commented on pull request #6112: [INLONG-6115][Agent] To solve Prometheus listener error and add unit tests

Keylchen commented on PR #6112:
URL: https://github.com/apache/inlong/pull/6112#issuecomment-1273069599

   1. The original PrometheusListener cannot get the data after running a collection task. 
   The problem is idCounter label dimension is not same with addCounterMetricFamily dimension count(There is one less dimension in front):
       The original logic:
       `CounterMetricFamily idCounter = new CounterMetricFamily("id", "metrics_of_agent_dimensions", this.dimensionKeys);
       addCounterMetricFamily:
               labelValues.add(defaultDimension);
               for (String key : this.dimensionKeys) {
               String labelValue = dimensions.getOrDefault(key, "-");
               labelValues.add(labelValue);
               }
       idCounter.addMetric(labelValues, value);`
      
   2. we can't use spaces and. in CounterMetricFamily help, otherwise there will be problems with prometheus " expected text error "


-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org