Skip to content

Commit

Permalink
Test that client.address is always captured (open-telemetry#10369)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored and steverao committed Feb 16, 2024
1 parent 5de3eb7 commit 7b719d4
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -760,14 +760,7 @@ protected SpanDataAssert assertServerSpan(
.isNotEqualTo(Long.valueOf(port)));
}

assertThat(attrs)
.hasEntrySatisfying(
SemanticAttributes.CLIENT_ADDRESS,
entry ->
assertThat(entry)
.satisfiesAnyOf(
value -> assertThat(value).isNull(),
value -> assertThat(value).isEqualTo(TEST_CLIENT_IP)));
assertThat(attrs).containsEntry(SemanticAttributes.CLIENT_ADDRESS, TEST_CLIENT_IP);
// client.port is opt-in
assertThat(attrs).doesNotContainKey(SemanticAttributes.CLIENT_PORT);

Expand Down

0 comments on commit 7b719d4

Please sign in to comment.