Skip to content

Commit

Permalink
Change fsimage_exporter_app_info to fsimage_exporter_build_info (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelmay committed Jul 29, 2020
1 parent 046c96c commit 10b9205
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ fsimage_replication_sum 22.0
fsimage_user_blocks{user_name="foo",} 2.0
fsimage_user_blocks{user_name="root",} 1.0
fsimage_user_blocks{user_name="mm",} 14.0
# HELP fsimage_exporter_app_info Application build info
# TYPE fsimage_exporter_app_info gauge
fsimage_exporter_app_info{appName="fsimage_exporter",appVersion="1.1-SNAPSHOT",buildTime="2017-10-17/19:13",buildScmVersion="491d70f88c6bc96c6a0d19fca27af07519534782",buildScmBranch="master",} 1.0
# HELP fsimage_exporter_build_info Application build info
# TYPE fsimage_exporter_build_info gauge
fsimage_exporter_build_info{appName="fsimage_exporter",appVersion="1.1-SNAPSHOT",buildTime="2017-10-17/19:13",buildScmVersion="491d70f88c6bc96c6a0d19fca27af07519534782",buildScmBranch="master",} 1.0
# HELP fsimage_scrape_requests_total Exporter requests made
# TYPE fsimage_scrape_requests_total counter
fsimage_scrape_requests_total 2.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public BuildInfoExporter(String metricPrefix, String appName) {
super();
this.appName = appName;

metricFamily = new GaugeMetricFamily(metricPrefix + "app_info",
metricFamily = new GaugeMetricFamily(metricPrefix + "build_info",
"Application build info",
Arrays.asList("appName", "appVersion", "buildTime", "buildScmVersion", "buildScmBranch"));
metricFamily.addMetric(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class BuildInfoExporterTest {
public void testCollect() {
BuildInfoExporter buildInfoExporter = new BuildInfoExporter("my_fsimage_", "foo");
final List<Collector.MetricFamilySamples> collect = buildInfoExporter.collect();
assertThat(getMetricFamilySamples(collect, "my_fsimage_app_info"))
assertThat(getMetricFamilySamples(collect, "my_fsimage_build_info"))
.hasTypeOfGauge()
.hasSampleLabelNames("appName", "appVersion", "buildTime", "buildScmVersion", "buildScmBranch")
.hasSampleValue(Arrays.asList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void testMetrics() throws Exception {

// App info
assertThat(body)
.contains("fsimage_exporter_app_info{appName=\"fsimage_exporter\",appVersion=\"")
.contains("fsimage_exporter_build_info{appName=\"fsimage_exporter\",appVersion=\"")
.contains("fsimage_scrape_requests_total ")
.contains("fsimage_compute_stats_duration_seconds_count ")
.contains("fsimage_compute_stats_duration_seconds_sum ")
Expand Down

0 comments on commit 10b9205

Please sign in to comment.