From 014dc0d7906c0df438c1b6d00501f7c3f4fa001b Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 11 Sep 2022 11:05:04 -0700 Subject: [PATCH] Rename two package-private instrumenter-api classes --- .../api/instrumenter/InstrumenterBuilder.java | 4 ++-- ...umenter.java => PropagatingFromUpstreamInstrumenter.java} | 5 +++-- ...umenter.java => PropagatingToDownstreamInstrumenter.java} | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) rename instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/{ServerInstrumenter.java => PropagatingFromUpstreamInstrumenter.java} (86%) rename instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/{ClientInstrumenter.java => PropagatingToDownstreamInstrumenter.java} (84%) diff --git a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java index ee78d5aeb711..778895cb1ccd 100644 --- a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java +++ b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java @@ -301,12 +301,12 @@ static InstrumenterConstructor internal() { static InstrumenterConstructor propagatingToDownstream( TextMapSetter setter) { - return builder -> new ClientInstrumenter<>(builder, setter); + return builder -> new PropagatingToDownstreamInstrumenter<>(builder, setter); } static InstrumenterConstructor propagatingFromUpstream( TextMapGetter getter) { - return builder -> new ServerInstrumenter<>(builder, getter); + return builder -> new PropagatingFromUpstreamInstrumenter<>(builder, getter); } } } diff --git a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/ServerInstrumenter.java b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/PropagatingFromUpstreamInstrumenter.java similarity index 86% rename from instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/ServerInstrumenter.java rename to instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/PropagatingFromUpstreamInstrumenter.java index f26a2e7e66e6..c5c1b184f208 100644 --- a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/ServerInstrumenter.java +++ b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/PropagatingFromUpstreamInstrumenter.java @@ -10,12 +10,13 @@ import io.opentelemetry.context.propagation.TextMapGetter; import io.opentelemetry.instrumentation.api.internal.ContextPropagationDebug; -final class ServerInstrumenter extends Instrumenter { +final class PropagatingFromUpstreamInstrumenter + extends Instrumenter { private final ContextPropagators propagators; private final TextMapGetter getter; - ServerInstrumenter( + PropagatingFromUpstreamInstrumenter( InstrumenterBuilder builder, TextMapGetter getter) { super(builder); this.propagators = builder.openTelemetry.getPropagators(); diff --git a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/ClientInstrumenter.java b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/PropagatingToDownstreamInstrumenter.java similarity index 84% rename from instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/ClientInstrumenter.java rename to instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/PropagatingToDownstreamInstrumenter.java index c5549ad3f5bd..2671f051f74e 100644 --- a/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/ClientInstrumenter.java +++ b/instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/PropagatingToDownstreamInstrumenter.java @@ -9,12 +9,13 @@ import io.opentelemetry.context.propagation.ContextPropagators; import io.opentelemetry.context.propagation.TextMapSetter; -final class ClientInstrumenter extends Instrumenter { +final class PropagatingToDownstreamInstrumenter + extends Instrumenter { private final ContextPropagators propagators; private final TextMapSetter setter; - ClientInstrumenter( + PropagatingToDownstreamInstrumenter( InstrumenterBuilder builder, TextMapSetter setter) { super(builder); this.propagators = builder.openTelemetry.getPropagators();