Skip to content

Commit

Permalink
Rename two package-private instrumenter-api classes (open-telemetry#6579
Browse files Browse the repository at this point in the history
)
  • Loading branch information
trask authored and LironKS committed Oct 31, 2022
1 parent 9c9f6a5 commit 529e862
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,12 @@ static <RQ, RS> InstrumenterConstructor<RQ, RS> internal() {

static <RQ, RS> InstrumenterConstructor<RQ, RS> propagatingToDownstream(
TextMapSetter<RQ> setter) {
return builder -> new ClientInstrumenter<>(builder, setter);
return builder -> new PropagatingToDownstreamInstrumenter<>(builder, setter);
}

static <RQ, RS> InstrumenterConstructor<RQ, RS> propagatingFromUpstream(
TextMapGetter<RQ> getter) {
return builder -> new ServerInstrumenter<>(builder, getter);
return builder -> new PropagatingFromUpstreamInstrumenter<>(builder, getter);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
import io.opentelemetry.context.propagation.TextMapGetter;
import io.opentelemetry.instrumentation.api.internal.ContextPropagationDebug;

final class ServerInstrumenter<REQUEST, RESPONSE> extends Instrumenter<REQUEST, RESPONSE> {
final class PropagatingFromUpstreamInstrumenter<REQUEST, RESPONSE>
extends Instrumenter<REQUEST, RESPONSE> {

private final ContextPropagators propagators;
private final TextMapGetter<REQUEST> getter;

ServerInstrumenter(
PropagatingFromUpstreamInstrumenter(
InstrumenterBuilder<REQUEST, RESPONSE> builder, TextMapGetter<REQUEST> getter) {
super(builder);
this.propagators = builder.openTelemetry.getPropagators();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
import io.opentelemetry.context.propagation.ContextPropagators;
import io.opentelemetry.context.propagation.TextMapSetter;

final class ClientInstrumenter<REQUEST, RESPONSE> extends Instrumenter<REQUEST, RESPONSE> {
final class PropagatingToDownstreamInstrumenter<REQUEST, RESPONSE>
extends Instrumenter<REQUEST, RESPONSE> {

private final ContextPropagators propagators;
private final TextMapSetter<REQUEST> setter;

ClientInstrumenter(
PropagatingToDownstreamInstrumenter(
InstrumenterBuilder<REQUEST, RESPONSE> builder, TextMapSetter<REQUEST> setter) {
super(builder);
this.propagators = builder.openTelemetry.getPropagators();
Expand Down

0 comments on commit 529e862

Please sign in to comment.