Skip to content

Commit

Permalink
[MINOR] Add trace switch (#812)
Browse files Browse the repository at this point in the history
* update some docs

Signed-off-by: qqeasonchen <[email protected]>

* Update java sdk docs (#663)

* Add files via upload

add pluggable-protocols.png

* add trace switch
* fix typos

* *fix CommonConfigurationTest

Co-authored-by: qqeasonchen <[email protected]>
Co-authored-by: Wenjun Ruan <[email protected]>
  • Loading branch information
3 people authored Mar 13, 2022
1 parent fcfe5ac commit 5bc8638
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
34 changes: 17 additions & 17 deletions docs/en/intro.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
![logo](../../docs/images/logo2.png)
## Features

### [SPI](features/spi.md)

### [protocol](instructions/eventmesh-runtime-protocol.md)

### [cloudevents](features/eventmesh-cloudevents-sdk-binding.md)

### [trace](features/eventmesh-trace-design.md)

### [metrics](features/eventmesh-metrics-export-design.md)

### [SchemaRegistry](features/eventmesh-schemaregistry-design.md)


### [Workflow](features/eventmesh-workflow-design.md)
![logo](../../docs/images/logo2.png)
## Features

### [SPI](features/spi.md)

### [protocol](instructions/eventmesh-runtime-protocol.md)

### [cloudevents](features/eventmesh-cloudevents-sdk-binding.md)

### [trace](features/eventmesh-trace-design.md)

### [metrics](features/eventmesh-metrics-export-design.md)

### [SchemaRegistry](features/eventmesh-schemaregistry-design.md)


### [Workflow](features/eventmesh-workflow-design.md)
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class CommonConfiguration {
public String eventMeshServerIp = null;
public boolean eventMeshServerSecurityEnable = false;
public boolean eventMeshServerRegistryEnable = false;
public boolean eventMeshServerTraceEnable = false;
protected ConfigurationWrapper configurationWrapper;

public String eventMeshWebhookOrigin = "eventmesh." + eventMeshIDC;
Expand Down Expand Up @@ -88,6 +89,7 @@ public void init() {
.collect(Collectors.toList());
}

eventMeshServerTraceEnable = Boolean.parseBoolean(get(ConfKeys.KEYS_EVENTMESH_TRACE_ENABLED, () -> "false"));
eventMeshTracePluginType = checkNotEmpty(ConfKeys.KEYS_EVENTMESH_TRACE_PLUGIN_TYPE);
}
}
Expand Down Expand Up @@ -147,8 +149,10 @@ static class ConfKeys {

public static String KEYS_ENENTMESH_REGISTRY_PLUGIN_TYPE = "eventMesh.registry.plugin.type";

public static String KEYS_EVENTMESH_METRICS_PLUGIN_TYPE = "eventmesh.metrics.plugin";
public static String KEYS_EVENTMESH_METRICS_PLUGIN_TYPE = "eventMesh.metrics.plugin";

public static String KEYS_EVENTMESH_TRACE_PLUGIN_TYPE = "eventmesh.trace.plugin";
public static String KEYS_EVENTMESH_TRACE_ENABLED = "eventMesh.server.trace.enabled";

public static String KEYS_EVENTMESH_TRACE_PLUGIN_TYPE = "eventMesh.trace.plugin";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ eventMesh.server.hostIp=value6
eventMesh.connector.plugin.type=rocketmq
eventMesh.security.plugin.type=acl
eventMesh.registry.plugin.type=namesrv
eventmesh.trace.plugin=zipkin
eventMesh.trace.plugin=zipkin
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class SubService implements InitializingBean {
final Properties properties = Utils.readPropertiesFile(ExampleConstants.CONFIG_FILE_NAME);

final List<SubscriptionItem> topicList = Lists.newArrayList(
new SubscriptionItem(ExampleConstants.EVENTMESH_HTTP_SYNC_TEST_TOPIC, SubscriptionMode.CLUSTERING, SubscriptionType.ASYNC)
new SubscriptionItem(ExampleConstants.EVENTMESH_HTTP_ASYNC_TEST_TOPIC, SubscriptionMode.CLUSTERING, SubscriptionType.ASYNC)
);
final String localIp = IPUtils.getLocalAddress();
final String localPort = properties.getProperty("server.port");
Expand Down
5 changes: 3 additions & 2 deletions eventmesh-runtime/conf/eventmesh.properties
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ eventMesh.server.registry.enabled=false
eventMesh.registry.plugin.type=namesrv

# metrics plugin, if you have multiple plugin, you can use ',' to split
eventmesh.metrics.plugin=prometheus
eventMesh.metrics.plugin=prometheus

# trace plugin
eventmesh.trace.plugin=zipkin
eventMesh.server.trace.enabled=false
eventMesh.trace.plugin=zipkin
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public void init() throws Exception {
registerHTTPRequestProcessor();

//get the trace-plugin
if (StringUtils.isNotEmpty(eventMeshHttpConfiguration.eventMeshTracePluginType)) {
if (StringUtils.isNotEmpty(eventMeshHttpConfiguration.eventMeshTracePluginType) && eventMeshHttpConfiguration.eventMeshServerTraceEnable) {

traceService =
TracePluginFactory.getTraceService(eventMeshHttpConfiguration.eventMeshTracePluginType);
Expand Down

0 comments on commit 5bc8638

Please sign in to comment.