Skip to content

Commit

Permalink
Added header null check and changelog
Browse files Browse the repository at this point in the history
Signed-off-by: Nishchay Malhotra <nishcha@amazon.com>
  • Loading branch information
nishchay21 committed Mar 26, 2024
1 parent e02fc95 commit 78dcc6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Make search query counters dynamic to support all query types ([#12601](https://github.com/opensearch-project/OpenSearch/pull/12601))
- [Tiered caching] Add policies controlling which values can enter pluggable caches [EXPERIMENTAL] ([#12542](https://github.com/opensearch-project/OpenSearch/pull/12542))
- [Tiered caching] Add Stale keys Management and CacheCleaner to IndicesRequestCache ([#12625](https://github.com/opensearch-project/OpenSearch/pull/12625))
- [Tracing Framework] Adds support for inferred sampling ([#12315](https://github.com/opensearch-project/OpenSearch/issues/12315))

### Dependencies
- Bump `peter-evans/find-comment` from 2 to 3 ([#12288](https://github.com/opensearch-project/OpenSearch/pull/12288))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Span startSpan(SpanCreationContext spanCreationContext, Map<String, Colle
}

private void addRequestAttributeToContext(SpanCreationContext spanCreationContext, Map<String, Collection<String>> headers) {
if (headers.containsKey(TracerContextStorage.INFERRED_SAMPLER)) {
if (headers !=null && headers.containsKey(TracerContextStorage.INFERRED_SAMPLER)) {
spanCreationContext.getAttributes().addAttribute(TracerContextStorage.INFERRED_SAMPLER, true);
}
}
Expand Down

0 comments on commit 78dcc6b

Please sign in to comment.