Skip to content

Commit

Permalink
Update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
stevejgordon committed Sep 9, 2024
1 parent cba6fdf commit ac59bc5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void AddsExpectedHttpAttributes_WhenUrlQuery_IsPresent()
{
const string scheme = "https";
const string path = "/my/path";
const string query = "q=OpenTelemetry";
const string query = "?q=OpenTelemetry";

var activity = _activitySource.CreateActivity("test", ActivityKind.Server)!;

Expand All @@ -87,7 +87,7 @@ public void AddsExpectedHttpAttributes_WhenUrlQuery_IsPresent()

// We can test with Tags (rather than TagObjects) here as we know these are string values
activity.Tags.Single(t => t.Key == TraceSemanticConventions.HttpScheme).Value.Should().Be(scheme);
activity.Tags.Single(t => t.Key == TraceSemanticConventions.HttpTarget).Value.Should().Be($"{path}?{query}");
activity.Tags.Single(t => t.Key == TraceSemanticConventions.HttpTarget).Value.Should().Be($"{path}{query}");
}

public void Dispose()
Expand Down

0 comments on commit ac59bc5

Please sign in to comment.