Skip to content

Commit

Permalink
add @nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Sep 2, 2024
1 parent b916800 commit fdcbbea
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import javax.annotation.Nullable;

/**
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
Expand All @@ -52,7 +53,7 @@ public final class DefaultHttpServerInstrumenterBuilder<REQUEST, RESPONSE> {
httpAttributesExtractorBuilder;
private final HttpSpanNameExtractorBuilder<REQUEST> httpSpanNameExtractorBuilder;

private final TextMapGetter<REQUEST> headerGetter;
@Nullable private final TextMapGetter<REQUEST> headerGetter;
private Function<SpanNameExtractor<? super REQUEST>, ? extends SpanNameExtractor<? super REQUEST>>
spanNameExtractorTransformer = Function.identity();
private final HttpServerRouteBuilder<REQUEST> httpServerRouteBuilder;
Expand All @@ -64,7 +65,7 @@ public DefaultHttpServerInstrumenterBuilder(
String instrumentationName,
OpenTelemetry openTelemetry,
HttpServerAttributesGetter<REQUEST, RESPONSE> attributesGetter,
TextMapGetter<REQUEST> headerGetter) {
@Nullable TextMapGetter<REQUEST> headerGetter) {
this.instrumentationName = instrumentationName;
this.openTelemetry = openTelemetry;
httpAttributesExtractorBuilder = HttpServerAttributesExtractor.builder(attributesGetter);
Expand Down

0 comments on commit fdcbbea

Please sign in to comment.