File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
src/OpenTelemetry.Exporter.Console Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ Fix MetricExporter to respect Console and Debug flags.
6
+
5
7
## 1.2.0-rc1
6
8
7
9
Released 2021-Nov-29
Original file line number Diff line number Diff line change 14
14
// limitations under the License.
15
15
// </copyright>
16
16
17
- using System ;
18
17
using System . Globalization ;
19
18
using System . Text ;
20
19
using OpenTelemetry . Metrics ;
@@ -42,7 +41,7 @@ public override ExportResult Export(in Batch<Metric> batch)
42
41
{
43
42
if ( resourceAttribute . Key . Equals ( "service.name" ) )
44
43
{
45
- Console . WriteLine ( "Service.Name" + resourceAttribute . Value ) ;
44
+ this . WriteLine ( "Service.Name" + resourceAttribute . Value ) ;
46
45
}
47
46
}
48
47
}
@@ -73,7 +72,7 @@ public override ExportResult Export(in Batch<Metric> batch)
73
72
}
74
73
}
75
74
76
- Console . WriteLine ( msg . ToString ( ) ) ;
75
+ this . WriteLine ( msg . ToString ( ) ) ;
77
76
78
77
foreach ( ref readonly var metricPoint in metric . GetMetricPoints ( ) )
79
78
{
@@ -174,7 +173,7 @@ public override ExportResult Export(in Batch<Metric> batch)
174
173
msg . Append ( metric . MetricType ) ;
175
174
msg . AppendLine ( ) ;
176
175
msg . Append ( $ "Value: { valueDisplay } ") ;
177
- Console . WriteLine ( msg ) ;
176
+ this . WriteLine ( msg . ToString ( ) ) ;
178
177
}
179
178
}
180
179
You can’t perform that action at this time.
0 commit comments