Skip to content

Commit

Permalink
Merge branch 'master' into doc/COC
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-sheng committed Mar 6, 2018
2 parents 502bbeb + 6e89250 commit f94ed1f
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 14 deletions.
Expand Up @@ -80,9 +80,8 @@ public void parseEntry(SpanDecorator spanDecorator, int applicationId, int insta
serviceReferenceMetric.setFrontServiceId(reference.getParentServiceId());

if (spanDecorator.getSpanLayer().equals(SpanLayer.MQ)) {
int peerId = spanDecorator.getPeerId();
int applicationIdByPeerId = applicationCacheService.getApplicationIdByAddressId(peerId);
int instanceIdByPeerId = instanceCacheService.getInstanceIdByAddressId(applicationIdByPeerId, peerId);
int applicationIdByPeerId = applicationCacheService.getApplicationIdByAddressId(reference.getNetworkAddressId());
int instanceIdByPeerId = instanceCacheService.getInstanceIdByAddressId(applicationIdByPeerId, reference.getNetworkAddressId());
serviceReferenceMetric.setFrontInstanceId(instanceIdByPeerId);
serviceReferenceMetric.setFrontApplicationId(applicationIdByPeerId);
} else {
Expand Down
Expand Up @@ -35,7 +35,7 @@ public class SegmentBase64Printer {
private static final Logger LOGGER = LoggerFactory.getLogger(SegmentBase64Printer.class);

public static void main(String[] args) throws InvalidProtocolBufferException {
String segmentBase64 = "CgwKCgIBsv/x1L2vgBsSggEQ////////////ARirnsP1niwg9Z7D9Z4sOhhIMi9KREJJL0Nvbm5lY3Rpb24vY2xvc2VKDGxvY2FsaG9zdDotMVABWAFgBHoOCgdkYi50eXBlEgNzcWx6GQoLZGIuaW5zdGFuY2USCmRhdGFTb3VyY2V6DgoMZGIuc3RhdGVtZW50GP///////////wEgAg==";
String segmentBase64 = "CgwKCgMXjPKUga3WgBsSvAEIARiF7Jq1nywgp+yatZ8sKlASDAoKAnPAqKD5rNaAGxgBIAIqDjEyNy4wLjAuMTo5MDkyOAJCFC9zZW5kTWVzc2FnZS97Y291bnR9UhQvc2VuZE1lc3NhZ2Uve2NvdW50fTocS2Fma2EvVHJhY2UtdG9waWMtMS9Db25zdW1lclgEYBt6GwoJbXEuYnJva2VyEg4xMjcuMC4wLjE6OTA5MnoZCghtcS50b3BpYxINVHJhY2UtdG9waWMtMRImEP///////////wEY/+uatZ8sILTsmrWfLDD///////////8BUAIYAiAD";
byte[] binarySegment = Base64.getDecoder().decode(segmentBase64);
TraceSegmentObject segmentObject = TraceSegmentObject.parseFrom(binarySegment);

Expand Down Expand Up @@ -72,6 +72,15 @@ public static void main(String[] args) throws InvalidProtocolBufferException {
LOGGER.info(" reference:");
span.getRefsList().forEach(reference -> {
LOGGER.info(" EntryApplicationInstanceId: {}", reference.getEntryApplicationInstanceId());
LOGGER.info(" EntryServiceId: {}", reference.getEntryServiceId());
LOGGER.info(" EntryServiceName: {}", reference.getEntryServiceName());
LOGGER.info(" ParentTraceSegmentId: {}", reference.getParentTraceSegmentId());
LOGGER.info(" ParentSpanId: {}", reference.getParentSpanId());
LOGGER.info(" ParentApplicationInstanceId: {}", reference.getParentApplicationInstanceId());
LOGGER.info(" ParentServiceId: {}", reference.getParentServiceId());
LOGGER.info(" ParentServiceName: {}", reference.getParentServiceName());
LOGGER.info(" NetworkAddressId: {}", reference.getNetworkAddressId());
LOGGER.info(" NetworkAddress: {}", reference.getNetworkAddress());
});
});
}
Expand Down
16 changes: 14 additions & 2 deletions docs/cn/Deploy-backend-in-cluster-mode-CN.md
Expand Up @@ -79,5 +79,17 @@ storage:

3. 运行`bin/startup.sh`启动。windows用户为.bat文件。

- **注意:startup.sh将会启动collector和UI两个进程,UI通过127.0.0.1:10800访问本地collector,无需额外配置。
如需保证UI负载均衡,推荐使用类nginx的HTTP代理服务。**

### 部署UI

1. 解压安装包 `tar -xvf skywalking-dist.tar.gz`,windows用户可以选择zip包
2. 配置UI集群模式.

UI的配置信息保存在 `bin/webappService.sh` 中 ( windows为`bin\webappService.bat`).

| 配置项 | 描述 |
|----------------------------------|----------------------------------------------------------------------------------|
| `server.port` | 监听端口 |
| `collector.ribbon.listOfServers` | collector命名服务地址.(与 `config/application.yml` 中的`naming.jetty`配置保持相同 ) |

3. 运行 `bin/webappService.sh`
2 changes: 1 addition & 1 deletion docs/cn/Deploy-backend-in-standalone-mode-CN.md
Expand Up @@ -14,7 +14,7 @@
## Quick Start
Collector单机模拟启动简单,提供和集群模式相同的功能,单机模式下除端口被占用的情况下,直接启动即可。

## 部署collector
## 部署后台服务
1. 解压安装包`tar -xvf skywalking-collector.tar.gz`,windows用户可以选择zip包
1. 运行`bin/startup.sh`启动。windows用户为.bat文件。

Expand Down
20 changes: 15 additions & 5 deletions docs/en/Deploy-backend-in-cluster-mode.md
@@ -1,6 +1,6 @@
## Required of third party softwares
- JDK 6+(instruments application can run in jdk6)
- JDK8 ( skywalking collector and skywalking webui )
- JDK8 ( skywalking collector and skywalking ui )
- Elasticsearch 5.2.2 or 5.3, cluster mode or not
- Zookeeper 3.4.10

Expand All @@ -22,7 +22,7 @@ thread_pool.bulk.queue_size: 1000
- Start Elasticsearch

### Deploy collector servers
1. Run `tar -xvf skywalking-collector.tar.gz`
1. Run `tar -xvf skywalking-dist.tar.gz`
2. Config collector in cluster mode.

Cluster mode depends on Zookeeper register and application discovery capabilities. So, you just need to adjust the IP config items in `config/application.yml`. Change IP and port configs of naming, remote, agent_gRPC, agent_jetty and ui,
Expand Down Expand Up @@ -75,8 +75,18 @@ storage:
ttl: 7
```

3. Run `bin/collectorService.sh`

3. Run `bin/startup.sh`
### Deploy UI servers

- NOTICE: **In 5.0.0-alpha, startup.sh will start two processes, collector and UI, and UI uses 127.0.0.1:10800 as default.
Recommend use http proxy to access UI in product, otherwise, access any UI.**
1. Run `tar -xvf skywalking-dist.tar.gz`
2. Config UI in cluster mode.

The config items of UI is saved in `bin/webappService.sh` (`bin\webappService.bat` for windows).

| Config | Description |
|----------------------------------|------------------------------------------------------------------------------------------------------|
| `server.port` | Port to listen on |
| `collector.ribbon.listOfServers` | Address to access collector naming service.(Consist with `naming.jetty` in `config/application.yml`) |

3. Run `bin/webappService.sh`
4 changes: 2 additions & 2 deletions docs/en/Deploy-backend-in-standalone-mode.md
Expand Up @@ -12,9 +12,9 @@ If you are using skywalking in a low throughputs monitoring scenario, and don't
* [Releases](https://github.com/apache/incubator-skywalking/releases)

## Quick start
You can simplely tar/unzip and startup if ports 10800, 11800, 12800 are free.
You can simplely tar/unzip and startup if ports 8080, 10800, 11800, 12800 are free.

- `tar -xvf skywalking-collector.tar.gz` in Linux, or unzip in windows.
- `tar -xvf skywalking-dist.tar.gz` in Linux, or unzip in windows.
- run `bin/startup.sh` or `bin/startup.bat`

You should keep the `config/application.yml` as default.
Expand Down

0 comments on commit f94ed1f

Please sign in to comment.