Skip to content

Commit

Permalink
Update GenevaTraceExporter (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
utpilla authored Jan 5, 2023
1 parent a10f287 commit 70f9f0f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Threading;

Expand Down Expand Up @@ -286,7 +287,7 @@ internal int SerializeActivity(Activity activity)
}
else if (string.Equals(entry.Key, "otel.status_code", StringComparison.Ordinal))
{
if (string.Equals(entry.Value.ToString(), "ERROR", StringComparison.Ordinal))
if (string.Equals(Convert.ToString(entry.Value, CultureInfo.InvariantCulture), "ERROR", StringComparison.Ordinal))
{
isStatusSuccess = false;
}
Expand All @@ -295,7 +296,7 @@ internal int SerializeActivity(Activity activity)
}
else if (string.Equals(entry.Key, "otel.status_description", StringComparison.Ordinal))
{
statusDescription = entry.Value.ToString();
statusDescription = Convert.ToString(entry.Value, CultureInfo.InvariantCulture);
continue;
}
else if (this.m_customFields == null || this.m_customFields.ContainsKey(entry.Key))
Expand Down

0 comments on commit 70f9f0f

Please sign in to comment.