Skip to content

Commit

Permalink
Merge branch '3.2' into 0618_rename
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ authored Jun 18, 2023
2 parents f07d3b1 + 467622a commit 4276aa4
Show file tree
Hide file tree
Showing 69 changed files with 1,460 additions and 254 deletions.
1 change: 1 addition & 0 deletions .artifacts
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,5 @@ dubbo-nacos-spring-boot-starter
dubbo-zookeeper-spring-boot-starter
dubbo-zookeeper-curator5-spring-boot-starter
dubbo-spring-security
dubbo-tracing
dubbo-xds
5 changes: 0 additions & 5 deletions dubbo-cluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,5 @@
<version>${project.parent.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-integration-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
consumercontext=org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter
consumer-classloader=org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter
router-snapshot=org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter
observationsender=org.apache.dubbo.rpc.cluster.filter.support.ObservationSenderFilter
metricsClusterFilter=org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public interface LoggerCodeConstants {

String VULNERABILITY_WARNING = "0-28";

String COMMON_NOT_FOUND_TRACER_DEPENDENCY = "0-29";


// Registry module

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ public class BaggageConfig implements Serializable {
*/
private List<String> remoteFields = new ArrayList<>();

public BaggageConfig() {
}

public BaggageConfig(Boolean enabled) {
this.enabled = enabled;
}

public BaggageConfig(Boolean enabled, Correlation correlation, List<String> remoteFields) {
this.enabled = enabled;
this.correlation = correlation;
this.remoteFields = remoteFields;
}

public Boolean getEnabled() {
return enabled;
}
Expand Down Expand Up @@ -76,6 +89,18 @@ public static class Correlation implements Serializable {
*/
private List<String> fields = new ArrayList<>();

public Correlation() {
}

public Correlation(boolean enabled) {
this.enabled = enabled;
}

public Correlation(boolean enabled, List<String> fields) {
this.enabled = enabled;
this.fields = fields;
}

public boolean isEnabled() {
return this.enabled;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

package org.apache.dubbo.config.nested;

import org.apache.dubbo.config.support.Nested;

import java.io.Serializable;
import java.time.Duration;
import java.util.HashMap;
import java.util.Map;

import org.apache.dubbo.config.support.Nested;

public class ExporterConfig implements Serializable {

@Nested
Expand Down Expand Up @@ -56,15 +56,28 @@ public static class ZipkinConfig implements Serializable {
private String endpoint;

/**
* Connection timeout for requests to Zipkin.
* Connection timeout for requests to Zipkin. (seconds)
*/
private Duration connectTimeout = Duration.ofSeconds(1);

/**
* Read timeout for requests to Zipkin.
* Read timeout for requests to Zipkin. (seconds)
*/
private Duration readTimeout = Duration.ofSeconds(10);

public ZipkinConfig() {
}

public ZipkinConfig(String endpoint) {
this.endpoint = endpoint;
}

public ZipkinConfig(String endpoint, Duration connectTimeout, Duration readTimeout) {
this.endpoint = endpoint;
this.connectTimeout = connectTimeout;
this.readTimeout = readTimeout;
}

public String getEndpoint() {
return endpoint;
}
Expand Down Expand Up @@ -98,7 +111,7 @@ public static class OtlpConfig implements Serializable {
private String endpoint;

/**
* The maximum time to wait for the collector to process an exported batch of spans.
* The maximum time to wait for the collector to process an exported batch of spans. (seconds)
*/
private Duration timeout = Duration.ofSeconds(10);

Expand All @@ -110,6 +123,24 @@ public static class OtlpConfig implements Serializable {

private Map<String, String> headers = new HashMap<>();

public OtlpConfig() {
}

public OtlpConfig(String endpoint) {
this.endpoint = endpoint;
}

public OtlpConfig(String endpoint, Duration timeout) {
this.endpoint = endpoint;
this.timeout = timeout;
}

public OtlpConfig(String endpoint, Duration timeout, String compressionMethod) {
this.endpoint = endpoint;
this.timeout = timeout;
this.compressionMethod = compressionMethod;
}

public String getEndpoint() {
return endpoint;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ public class PropagationConfig implements Serializable {
*/
private String type = W3C;

public PropagationConfig() {
}

public PropagationConfig(String type) {
this.type = type;
}

public String getType() {
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ public class SamplingConfig implements Serializable {
*/
private float probability = 0.10f;

public SamplingConfig() {
}

public SamplingConfig(float probability) {
this.probability = probability;
}

public float getProbability() {
return this.probability;
}
Expand Down
6 changes: 6 additions & 0 deletions dubbo-config/dubbo-config-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-tracing</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-monitor-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import java.beans.Transient;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.TreeSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -409,9 +409,7 @@ private Map<String, String> appendConfig() {
logger.warn(CONFIG_NO_METHOD_FOUND, "", "", "No method found in service interface: " + interfaceClass.getName());
map.put(METHODS_KEY, ANY_VALUE);
} else {
List<String> copyOfMethods = new ArrayList<>(Arrays.asList(methods));
copyOfMethods.sort(Comparator.naturalOrder());
map.put(METHODS_KEY, String.join(COMMA_SEPARATOR, copyOfMethods));
map.put(METHODS_KEY, StringUtils.join(new TreeSet<>(Arrays.asList(methods)), COMMA_SEPARATOR));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.TreeSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -584,9 +584,7 @@ private Map<String, String> buildAttributes(ProtocolConfig protocolConfig) {
logger.warn(CONFIG_NO_METHOD_FOUND, "", "", "No method found in service interface: " + interfaceClass.getName());
map.put(METHODS_KEY, ANY_VALUE);
} else {
List<String> copyOfMethods = new ArrayList<>(Arrays.asList(methods));
copyOfMethods.sort(Comparator.naturalOrder());
map.put(METHODS_KEY, String.join(COMMA_SEPARATOR, copyOfMethods));
map.put(METHODS_KEY, StringUtils.join(new TreeSet<>(Arrays.asList(methods)), COMMA_SEPARATOR));
}
}

Expand Down
Loading

0 comments on commit 4276aa4

Please sign in to comment.