Skip to content

Commit

Permalink
Add comment and compare Activity.Current to IHttpFeatureActivityFeatu…
Browse files Browse the repository at this point in the history
…re activity
  • Loading branch information
ngruson committed Dec 8, 2023
1 parent 0e26e0b commit 98c8feb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,8 @@ public async Task NoSiblingActivityCreatedWhenTraceFlagsNone()
var result = bool.Parse(await response.Content.ReadAsStringAsync());

Assert.True(response.IsSuccessStatusCode);

// Confirm that Activity.Current and IHttpActivityFeature activity are same
Assert.True(result);
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public IReadOnlyDictionary<string, string> GetChildActivityBaggageContext()
public bool GetActivityEquality()
{
var activity = this.HttpContext.Features.GetRequiredFeature<IHttpActivityFeature>().Activity;
var equal = Activity.Current?.Id == activity.Id;
var equal = Activity.Current == activity;
return equal;
}
}

0 comments on commit 98c8feb

Please sign in to comment.