Skip to content

Commit

Permalink
Merge branch 'zipkin-v3' into cassandra
Browse files Browse the repository at this point in the history
  • Loading branch information
mrproliu committed Oct 7, 2023
2 parents f6c2a53 + 8e02e6e commit ba35439
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 5 deletions.
5 changes: 5 additions & 0 deletions zipkin-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<module>../skywalking/oap-server/server-receiver-plugin/receiver-proto</module>
<module>../skywalking/oap-server/server-receiver-plugin/zipkin-receiver-plugin</module>
<module>../skywalking/oap-server/server-cluster-plugin/cluster-standalone-plugin</module>
<module>../skywalking/oap-server/server-cluster-plugin/cluster-consul-plugin</module>
<module>../skywalking/oap-server/server-cluster-plugin/cluster-etcd-plugin</module>
<module>../skywalking/oap-server/server-cluster-plugin/cluster-kubernetes-plugin</module>
<module>../skywalking/oap-server/server-cluster-plugin/cluster-nacos-plugin</module>
<module>../skywalking/oap-server/server-cluster-plugin/cluster-zookeeper-plugin</module>
<module>../skywalking/oap-server/server-storage-plugin</module>
<module>../skywalking/oap-server/server-library</module>
<module>../skywalking/oap-server/server-query-plugin/zipkin-query-plugin</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public class CoreModuleConfig extends ModuleConfig {
*/
private int persistentPeriod = 25;

/**
* Timeout for cluster internal communication, in seconds.
*/
private int remoteTimeout = 20;

private static final String DEFAULT_SEARCHABLE_TAG_KEYS = String.join(
Const.COMMA,
"http.method"
Expand Down Expand Up @@ -182,4 +187,12 @@ public int getPersistentPeriod() {
public void setPersistentPeriod(int persistentPeriod) {
this.persistentPeriod = persistentPeriod;
}

public int getRemoteTimeout() {
return remoteTimeout;
}

public void setRemoteTimeout(int remoteTimeout) {
this.remoteTimeout = remoteTimeout;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import org.apache.skywalking.oap.server.core.server.HTTPHandlerRegister;
import org.apache.skywalking.oap.server.core.source.DefaultScopeDefine;
import org.apache.skywalking.oap.server.core.source.SourceReceiver;
import org.apache.skywalking.oap.server.core.source.SourceReceiverImpl;
import org.apache.skywalking.oap.server.core.status.ServerStatusService;
import org.apache.skywalking.oap.server.core.storage.PersistenceTimer;
import org.apache.skywalking.oap.server.core.storage.StorageException;
Expand Down Expand Up @@ -152,8 +151,7 @@ public void prepare() throws ServiceNotProvidedException, ModuleStartException {
final WorkerInstancesService instancesService = new WorkerInstancesService();
this.registerServiceImplementation(IWorkerInstanceGetter.class, instancesService);
this.registerServiceImplementation(IWorkerInstanceSetter.class, instancesService);
// no cluster mode for zipkin, for sending the streaming data to the local
this.registerServiceImplementation(RemoteSenderService.class, new SelfSenderService(getManager()));
this.registerServiceImplementation(RemoteSenderService.class, new RemoteSenderService(getManager()));
this.registerServiceImplementation(ModelCreator.class, storageModels);
this.registerServiceImplementation(IModelManager.class, storageModels);
this.registerServiceImplementation(ModelManipulator.class, storageModels);
Expand All @@ -180,7 +178,7 @@ public void prepare() throws ServiceNotProvidedException, ModuleStartException {
this.registerServiceImplementation(ContinuousProfilingQueryService.class, new ContinuousProfilingQueryService(getManager()));
this.registerServiceImplementation(CommandService.class, new CommandService(getManager()));
this.registerServiceImplementation(OALEngineLoaderService.class, new OALEngineLoaderService(getManager()));
this.registerServiceImplementation(RemoteClientManager.class, new RemoteClientManager(getManager(), 0));
this.registerServiceImplementation(RemoteClientManager.class, new RemoteClientManager(getManager(), moduleConfig.getRemoteTimeout()));
this.registerServiceImplementation(UITemplateManagementService.class, new UITemplateManagementService(getManager()));
this.registerServiceImplementation(UIMenuManagementService.class, new UIMenuManagementService(getManager(), swConfig));

Expand Down
50 changes: 49 additions & 1 deletion zipkin-server/server-starter/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,52 @@ telemetry:

cluster:
selector: standalone
standalone:
standalone:
# Please check your ZooKeeper is 3.5+, However, it is also compatible with ZooKeeper 3.4.x. Replace the ZooKeeper 3.5+
# library the oap-libs folder with your ZooKeeper 3.4.x library.
zookeeper:
namespace: ${ZIPKIN_NAMESPACE:""}
hostPort: ${ZIPKIN_CLUSTER_ZK_HOST_PORT:localhost:2181}
# Retry Policy
baseSleepTimeMs: ${ZIPKIN_CLUSTER_ZK_SLEEP_TIME:1000} # initial amount of time to wait between retries
maxRetries: ${ZIPKIN_CLUSTER_ZK_MAX_RETRIES:3} # max number of times to retry
# Enable ACL
enableACL: ${ZIPKIN_ZK_ENABLE_ACL:false} # disable ACL in default
schema: ${ZIPKIN_ZK_SCHEMA:digest} # only support digest schema
expression: ${ZIPKIN_ZK_EXPRESSION:zipkin:zipkin}
internalComHost: ${ZIPKIN_CLUSTER_INTERNAL_COM_HOST:""}
internalComPort: ${ZIPKIN_CLUSTER_INTERNAL_COM_PORT:-1}
kubernetes:
namespace: ${ZIPKIN_CLUSTER_K8S_NAMESPACE:default}
labelSelector: ${ZIPKIN_CLUSTER_K8S_LABEL:app=collector,release=zipkin}
uidEnvName: ${ZIPKIN_CLUSTER_K8S_UID:ZIPKIN_COLLECTOR_UID}
consul:
serviceName: ${ZIPKIN_SERVICE_NAME:"Zipkin_Cluster"}
# Consul cluster nodes, example: 10.0.0.1:8500,10.0.0.2:8500,10.0.0.3:8500
hostPort: ${ZIPKIN_CLUSTER_CONSUL_HOST_PORT:localhost:8500}
aclToken: ${ZIPKIN_CLUSTER_CONSUL_ACLTOKEN:""}
internalComHost: ${ZIPKIN_CLUSTER_INTERNAL_COM_HOST:""}
internalComPort: ${ZIPKIN_CLUSTER_INTERNAL_COM_PORT:-1}
etcd:
# etcd cluster nodes, example: 10.0.0.1:2379,10.0.0.2:2379,10.0.0.3:2379
endpoints: ${ZIPKIN_CLUSTER_ETCD_ENDPOINTS:localhost:2379}
namespace: ${ZIPKIN_CLUSTER_ETCD_NAMESPACE:/zipkin}
serviceName: ${ZIPKIN_CLUSTER_ETCD_SERVICE_NAME:"Zipkin_Cluster"}
authentication: ${ZIPKIN_CLUSTER_ETCD_AUTHENTICATION:false}
user: ${ZIPKIN_CLUSTER_ETCD_USER:}
password: ${ZIPKIN_CLUSTER_ETCD_PASSWORD:}
internalComHost: ${ZIPKIN_CLUSTER_INTERNAL_COM_HOST:""}
internalComPort: ${ZIPKIN_CLUSTER_INTERNAL_COM_PORT:-1}
nacos:
serviceName: ${ZIPKIN_SERVICE_NAME:"Zipkin_Cluster"}
hostPort: ${ZIPKIN_CLUSTER_NACOS_HOST_PORT:localhost:8848}
# Nacos Configuration namespace
namespace: ${ZIPKIN_CLUSTER_NACOS_NAMESPACE:"public"}
# Nacos auth username
username: ${ZIPKIN_CLUSTER_NACOS_USERNAME:""}
password: ${ZIPKIN_CLUSTER_NACOS_PASSWORD:""}
# Nacos auth accessKey
accessKey: ${ZIPKIN_CLUSTER_NACOS_ACCESSKEY:""}
secretKey: ${ZIPKIN_CLUSTER_NACOS_SECRETKEY:""}
internalComHost: ${ZIPKIN_CLUSTER_INTERNAL_COM_HOST:""}
internalComPort: ${ZIPKIN_CLUSTER_INTERNAL_COM_PORT:-1}

0 comments on commit ba35439

Please sign in to comment.