-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[go_expvar] Fix path tag appended to all metrics matching path regex (#…
…472)
- Loading branch information
Showing
5 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,8 +175,7 @@ def parse_expvar_data(self, data, tags, metrics, max_metrics, namespace): | |
|
||
for traversed_path, value in values: | ||
actual_path = ".".join(traversed_path) | ||
if tag_by_path: | ||
metric_tags.append("path:%s" % actual_path) | ||
path_tag = ["path:%s" % actual_path] if tag_by_path else [] | ||
|
||
metric_name = alias or self.normalize(actual_path, namespace, fix_case=True) | ||
|
||
|
@@ -191,7 +190,7 @@ def parse_expvar_data(self, data, tags, metrics, max_metrics, namespace): | |
"Please contact [email protected] for more information.") | ||
return | ||
|
||
SUPPORTED_TYPES[metric_type](self, metric_name, value, metric_tags) | ||
SUPPORTED_TYPES[metric_type](self, metric_name, value, metric_tags + path_tag) | ||
count += 1 | ||
|
||
def deep_get(self, content, keys, traversed_path=None): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,6 @@ | |
"mac_os", | ||
"windows" | ||
], | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"guid": "33557f7a-5f24-43f3-9551-78432894e539" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters