@@ -509,7 +509,7 @@ func TestAllMetricsSuccess(t *testing.T) {
509509 test := prepareExporterTest (t , createTestConfig (), []func (w http.ResponseWriter , req * http.Request ){
510510 func (w http.ResponseWriter , req * http.Request ) {
511511 body := extractBody (t , req )
512- expected := `test_metric_data {test="test_value",test2="second_value"} 14500 1605534165000
512+ expected := `test.metric.data {test="test_value",test2="second_value"} 14500 1605534165000
513513gauge_metric_name{foo="bar",remote_name="156920",url="http://example_url"} 124 1608124661166
514514gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1608124662166`
515515 assert .Equal (t , expected , body )
@@ -559,7 +559,7 @@ func TestAllMetricsFailed(t *testing.T) {
559559 w .WriteHeader (500 )
560560
561561 body := extractBody (t , req )
562- expected := `test_metric_data {test="test_value",test2="second_value"} 14500 1605534165000
562+ expected := `test.metric.data {test="test_value",test2="second_value"} 14500 1605534165000
563563gauge_metric_name{foo="bar",remote_name="156920",url="http://example_url"} 124 1608124661166
564564gauge_metric_name{foo="bar",remote_name="156955",url="http://another_url"} 245 1608124662166`
565565 assert .Equal (t , expected , body )
@@ -587,7 +587,7 @@ func TestMetricsPartiallyFailed(t *testing.T) {
587587 w .WriteHeader (500 )
588588
589589 body := extractBody (t , req )
590- expected := `test_metric_data {test="test_value",test2="second_value"} 14500 1605534165000`
590+ expected := `test.metric.data {test="test_value",test2="second_value"} 14500 1605534165000`
591591 assert .Equal (t , expected , body )
592592 assert .Equal (t , "application/vnd.sumologic.prometheus" , req .Header .Get ("Content-Type" ))
593593 },
@@ -643,7 +643,7 @@ func TestMetricsDifferentMetadata(t *testing.T) {
643643 w .WriteHeader (500 )
644644
645645 body := extractBody (t , req )
646- expected := `test_metric_data {test="test_value",test2="second_value",key1="value1"} 14500 1605534165000`
646+ expected := `test.metric.data {test="test_value",test2="second_value",key1="value1"} 14500 1605534165000`
647647 assert .Equal (t , expected , body )
648648 assert .Equal (t , "application/vnd.sumologic.prometheus" , req .Header .Get ("Content-Type" ))
649649 },
@@ -826,7 +826,7 @@ func TestMetricsPrometheusFormatMetadataFilter(t *testing.T) {
826826 test := prepareExporterTest (t , createTestConfig (), []func (w http.ResponseWriter , req * http.Request ){
827827 func (w http.ResponseWriter , req * http.Request ) {
828828 body := extractBody (t , req )
829- expected := `test_metric_data {test="test_value",test2="second_value",key1="value1",key2="value2"} 14500 1605534165000`
829+ expected := `test.metric.data {test="test_value",test2="second_value",key1="value1",key2="value2"} 14500 1605534165000`
830830 assert .Equal (t , expected , body )
831831 assert .Equal (t , "application/vnd.sumologic.prometheus" , req .Header .Get ("Content-Type" ))
832832 },
@@ -881,7 +881,7 @@ func TestPushMetrics_AttributeTranslation(t *testing.T) {
881881 "X-Sumo-Category" : "harry-potter" ,
882882 "X-Sumo-Host" : "undefined" ,
883883 },
884- expectedBody : `test_metric_data {test="test_value",test2="second_value",host="harry-potter",InstanceType="wizard"} 14500 1605534165000` ,
884+ expectedBody : `test.metric.data {test="test_value",test2="second_value",host="harry-potter",InstanceType="wizard"} 14500 1605534165000` ,
885885 },
886886 {
887887 name : "enabled_with_ot_host_name_template_set_in_source_host" ,
@@ -899,7 +899,7 @@ func TestPushMetrics_AttributeTranslation(t *testing.T) {
899899 "X-Sumo-Category" : "harry-potter" ,
900900 "X-Sumo-Host" : "harry-potter" ,
901901 },
902- expectedBody : `test_metric_data {test="test_value",test2="second_value",host="harry-potter",InstanceType="wizard"} 14500 1605534165000` ,
902+ expectedBody : `test.metric.data {test="test_value",test2="second_value",host="harry-potter",InstanceType="wizard"} 14500 1605534165000` ,
903903 },
904904 {
905905 name : "enabled_with_proper_host_template_set_in_source_host_but_not_specified_in_metadata_attributes" ,
@@ -918,7 +918,7 @@ func TestPushMetrics_AttributeTranslation(t *testing.T) {
918918 "X-Sumo-Category" : "undefined" ,
919919 "X-Sumo-Host" : "undefined" ,
920920 },
921- expectedBody : `test_metric_data {test="test_value",test2="second_value",host="harry-potter",InstanceType="wizard"} 14500 1605534165000` ,
921+ expectedBody : `test.metric.data {test="test_value",test2="second_value",host="harry-potter",InstanceType="wizard"} 14500 1605534165000` ,
922922 },
923923 {
924924 name : "disabled" ,
@@ -935,7 +935,7 @@ func TestPushMetrics_AttributeTranslation(t *testing.T) {
935935 "X-Sumo-Category" : "harry-potter" ,
936936 "X-Sumo-Host" : "undefined" ,
937937 },
938- expectedBody : `test_metric_data {test="test_value",test2="second_value",host_name ="harry-potter",host_type ="wizard"} 14500 1605534165000` ,
938+ expectedBody : `test.metric.data {test="test_value",test2="second_value",host.name ="harry-potter",host.type ="wizard"} 14500 1605534165000` ,
939939 },
940940 {
941941 name : "disabled_with_ot_host_name_template_set_in_source_host" ,
@@ -952,7 +952,7 @@ func TestPushMetrics_AttributeTranslation(t *testing.T) {
952952 "X-Sumo-Category" : "harry-potter" ,
953953 "X-Sumo-Host" : "harry-potter" ,
954954 },
955- expectedBody : `test_metric_data {test="test_value",test2="second_value",host_name ="harry-potter",host_type ="wizard"} 14500 1605534165000` ,
955+ expectedBody : `test.metric.data {test="test_value",test2="second_value",host.name ="harry-potter",host.type ="wizard"} 14500 1605534165000` ,
956956 },
957957 }
958958
0 commit comments