Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracing Instrumentation] Fix for null connection test cases #10410

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix remove ingest processor handing ignore_missing parameter not correctly ([10089](https://github.com/opensearch-project/OpenSearch/pull/10089))
- Fix circular dependency in Settings initialization ([10194](https://github.com/opensearch-project/OpenSearch/pull/10194))
- Fix registration and initialization of multiple extensions ([10256](https://github.com/opensearch-project/OpenSearch/pull/10256))
- [Tracing Instrumentation] Fix for null connection test cases ([10410](https://github.com/opensearch-project/OpenSearch/pull/10410))

### Security

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static Attributes buildSpanAttributes(RestRequest restRequest) {
}

private static String createSpanName(String action, Transport.Connection connection) {
return action + SEPARATOR + (connection.getNode() != null ? connection.getNode().getHostAddress() : null);
return action + SEPARATOR + ((connection != null && connection.getNode() != null) ? connection.getNode().getHostAddress() : null);
}

private static Attributes buildSpanAttributes(String action, Transport.Connection connection) {
Expand Down
Loading