Skip to content

Commit

Permalink
change span_id to number everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspimentel committed Dec 19, 2024
1 parent 4fc2793 commit 19ffb0a
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions utils/build/docker/dotnet/parametric/Endpoints/ApmTestApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,17 +315,11 @@ protected static async Task FlushTraceStats()

private static ISpan FindSpan(JsonElement json, string key = "span_id")
{
var spanIdString = json.GetProperty(key).GetString();

if (!ulong.TryParse(spanIdString, out var spanId))
{
_logger?.LogError("Required {key}:{value} not valid in request json.", key, spanIdString);
throw new InvalidOperationException($"Required {key}:{spanIdString} not valid in request json.");
}
var spanId = json.GetProperty(key).GetUInt64();

if (!Spans.TryGetValue(spanId, out var span))
{
_logger?.LogError("Span not found with span id: {spanId}.", spanIdString);
_logger?.LogError("Span not found with span id: {spanId}.", spanId);
throw new InvalidOperationException($"Span not found with span id: {spanId}");
}

Expand Down

0 comments on commit 19ffb0a

Please sign in to comment.