diff --git a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java index 273bbb0f11d0..b229a7126e48 100644 --- a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java +++ b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java @@ -169,14 +169,7 @@ public DefaultHttpServerInstrumenterBuilder setSpanNameExtrac } public Instrumenter build() { - return build(b -> {}); - } - - public Instrumenter build( - Consumer> instrumenterBuilderConsumer) { - InstrumenterBuilder builder = builder(); - instrumenterBuilderConsumer.accept(builder); if (headerGetter != null) { return builder.buildServerInstrumenter(headerGetter); @@ -184,7 +177,7 @@ public Instrumenter build( return builder.buildInstrumenter(SpanKindExtractor.alwaysServer()); } - public InstrumenterBuilder builder() { + private InstrumenterBuilder builder() { SpanNameExtractor spanNameExtractor = spanNameExtractorTransformer.apply(httpSpanNameExtractorBuilder.build()); @@ -206,10 +199,6 @@ public InstrumenterBuilder builder() { return builder; } - public OpenTelemetry getOpenTelemetry() { - return openTelemetry; - } - @CanIgnoreReturnValue public DefaultHttpServerInstrumenterBuilder configure(CommonConfig config) { set(config::getKnownHttpRequestMethods, this::setKnownMethods);