Polish
See gh-43316
This commit is contained in:
committed by
Stéphane Nicoll
parent
a0309a5475
commit
859c235a95
@@ -55,19 +55,19 @@ class OpenTelemetryLoggingDockerComposeConnectionDetailsFactory
|
||||
|
||||
private final int grpcPort;
|
||||
|
||||
private final int httPort;
|
||||
private final int httpPort;
|
||||
|
||||
private OpenTelemetryLoggingDockerComposeConnectionDetails(RunningService source) {
|
||||
super(source);
|
||||
this.host = source.host();
|
||||
this.grpcPort = source.ports().get(OTLP_GRPC_PORT);
|
||||
this.httPort = source.ports().get(OTLP_HTTP_PORT);
|
||||
this.httpPort = source.ports().get(OTLP_HTTP_PORT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUrl(Transport transport) {
|
||||
int port = switch (transport) {
|
||||
case HTTP -> this.httPort;
|
||||
case HTTP -> this.httpPort;
|
||||
case GRPC -> this.grpcPort;
|
||||
};
|
||||
return "http://%s:%d/v1/logs".formatted(this.host, port);
|
||||
|
||||
@@ -56,19 +56,19 @@ class OpenTelemetryTracingDockerComposeConnectionDetailsFactory
|
||||
|
||||
private final int grpcPort;
|
||||
|
||||
private final int httPort;
|
||||
private final int httpPort;
|
||||
|
||||
private OpenTelemetryTracingDockerComposeConnectionDetails(RunningService source) {
|
||||
super(source);
|
||||
this.host = source.host();
|
||||
this.grpcPort = source.ports().get(OTLP_GRPC_PORT);
|
||||
this.httPort = source.ports().get(OTLP_HTTP_PORT);
|
||||
this.httpPort = source.ports().get(OTLP_HTTP_PORT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUrl(Transport transport) {
|
||||
int port = switch (transport) {
|
||||
case HTTP -> this.httPort;
|
||||
case HTTP -> this.httpPort;
|
||||
case GRPC -> this.grpcPort;
|
||||
};
|
||||
return "http://%s:%d/v1/traces".formatted(this.host, port);
|
||||
|
||||
Reference in New Issue
Block a user