diff --git a/exporters/ostream/test/ostream_metric_test.cc b/exporters/ostream/test/ostream_metric_test.cc index 8620ed1017..6e62c59a2d 100644 --- a/exporters/ostream/test/ostream_metric_test.cc +++ b/exporters/ostream/test/ostream_metric_test.cc @@ -82,6 +82,11 @@ TEST(OStreamMetricsExporter, ExportSumPointData) "\n value\t\t: 20" "\n attributes\t\t: " "\n\ta1: b1" + "\n resources\t:" + "\n\tservice.name: unknown_service" + "\n\ttelemetry.sdk.version: 1.4.1" + "\n\ttelemetry.sdk.name: opentelemetry" + "\n\ttelemetry.sdk.language: cpp" "\n}\n"; ASSERT_EQ(stdoutOutput.str(), expected_output); } @@ -153,6 +158,11 @@ TEST(OStreamMetricsExporter, ExportHistogramPointData) "\n counts : [200, 300, 400, 500, ]" "\n attributes\t\t: " "\n\ta1: b1" + "\n resources\t:" + "\n\tservice.name: unknown_service" + "\n\ttelemetry.sdk.version: 1.4.1" + "\n\ttelemetry.sdk.name: opentelemetry" + "\n\ttelemetry.sdk.language: cpp" "\n}\n"; ASSERT_EQ(stdoutOutput.str(), expected_output); } @@ -217,6 +227,11 @@ TEST(OStreamMetricsExporter, ExportLastValuePointData) "\n valid : true" "\n value : 20" "\n attributes\t\t: " + "\n resources\t:" + "\n\tservice.name: unknown_service" + "\n\ttelemetry.sdk.version: 1.4.1" + "\n\ttelemetry.sdk.name: opentelemetry" + "\n\ttelemetry.sdk.language: cpp" "\n}\n"; ASSERT_EQ(stdoutOutput.str(), expected_output); } @@ -265,6 +280,11 @@ TEST(OStreamMetricsExporter, ExportDropPointData) "\n name\t\t: library_name" "\n description\t: description" "\n unit\t\t: unit" + "\n resources\t:" + "\n\tservice.name: unknown_service" + "\n\ttelemetry.sdk.version: 1.4.1" + "\n\ttelemetry.sdk.name: opentelemetry" + "\n\ttelemetry.sdk.language: cpp" "\n}\n"; ASSERT_EQ(stdoutOutput.str(), expected_output);