From 5bf055ab133cead2f7be642db69284d08325a0d6 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 10 Jul 2024 18:15:19 +0200 Subject: [PATCH] pr review --- .../DefaultHttpServerInstrumenterBuilder.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) 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);