Skip to content

Commit

Permalink
pr review
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Jul 10, 2024
1 parent 590a611 commit 5bf055a
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,15 @@ public DefaultHttpServerInstrumenterBuilder<REQUEST, RESPONSE> setSpanNameExtrac
}

public Instrumenter<REQUEST, RESPONSE> build() {
return build(b -> {});
}

public Instrumenter<REQUEST, RESPONSE> build(
Consumer<InstrumenterBuilder<REQUEST, RESPONSE>> instrumenterBuilderConsumer) {

InstrumenterBuilder<REQUEST, RESPONSE> builder = builder();
instrumenterBuilderConsumer.accept(builder);

if (headerGetter != null) {
return builder.buildServerInstrumenter(headerGetter);
}
return builder.buildInstrumenter(SpanKindExtractor.alwaysServer());
}

public InstrumenterBuilder<REQUEST, RESPONSE> builder() {
private InstrumenterBuilder<REQUEST, RESPONSE> builder() {
SpanNameExtractor<? super REQUEST> spanNameExtractor =
spanNameExtractorTransformer.apply(httpSpanNameExtractorBuilder.build());

Expand All @@ -206,10 +199,6 @@ public InstrumenterBuilder<REQUEST, RESPONSE> builder() {
return builder;
}

public OpenTelemetry getOpenTelemetry() {
return openTelemetry;
}

@CanIgnoreReturnValue
public DefaultHttpServerInstrumenterBuilder<REQUEST, RESPONSE> configure(CommonConfig config) {
set(config::getKnownHttpRequestMethods, this::setKnownMethods);
Expand Down

0 comments on commit 5bf055a

Please sign in to comment.