[
https://issues.apache.org/jira/browse/FLINK-4184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376580#comment-15376580
]
ASF GitHub Bot commented on FLINK-4184:
---------------------------------------
Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2220#discussion_r70768940
--- Diff:
flink-core/src/main/java/org/apache/flink/metrics/groups/AbstractMetricGroup.java
---
@@ -100,10 +101,29 @@ public AbstractMetricGroup(MetricRegistry registry,
String[] scope) {
* @return fully qualified metric name
*/
public String getMetricIdentifier(String metricName) {
+ return getMetricIdentifier(metricName, null);
+ }
+
+ /**
+ * Returns the fully qualified metric name, for example
+ * {@code "host-7.taskmanager-2.window_word_count.my-mapper.metricName"}
+ *
+ * @param metricName metric name
+ * @param filter character filter which is applied to the fully
qualified metric name
+ * @return fully qualified metric name
+ */
+ public String getMetricIdentifier(String metricName, CharacterFilter
filter) {
if (scopeString == null) {
- scopeString =
ScopeFormat.concat(registry.getDelimiter(), scopeComponents);
+ if (filter != null) {
+ scopeString =
ScopeFormat.concat(registry.getDelimiter(), scopeComponents);
--- End diff --
if no filter is given we will now never assign to scopeString, breaking all
names. We should assume that no filtering is required.
> Ganglia and GraphiteReporter report metric names with invalid characters
> ------------------------------------------------------------------------
>
> Key: FLINK-4184
> URL: https://issues.apache.org/jira/browse/FLINK-4184
> Project: Flink
> Issue Type: Bug
> Components: Metrics
> Affects Versions: 1.1.0
> Reporter: Till Rohrmann
> Assignee: Till Rohrmann
> Fix For: 1.1.0
>
>
> Flink's {{GangliaReporter}} and {{GraphiteReporter}} report metrics with
> names which contain invalid characters. For example, quotes are not filtered
> out which can be problematic for Ganglia. Moreover, dots are not replaced
> which causes Graphite to think that an IP address is actually a scoped metric
> name.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)