提交 e327790c 编写于 作者: wu-sheng's avatar wu-sheng

Provide en documents in /docs/en

上级 515d18d8
## Documents
[![cn doc](https://img.shields.io/badge/document-中文-blue.svg)](README_ZH.md)
* Getting Started
* [Quick start](/en/Quick-start.md)
* [Deploy Standalone mode collector](/en/Deploy-collector-in-standalong-mode.md)
* [Deploy Cluster mode collector](/en/Deploy-cluster-in-cluster-mode.md)
* [Deploy javaagent](/en/Deploy-skywalking-agent.md)
* [Deploy docker image](/en/Deploy-docker-image.md)
* [Supported middlewares, frameworks and libraries](/en/Supported-list.md)
* [How to disable plugins?](/en/How-to-disable-plugin.md)
* Application Toolkit
* [Overview](/en/Applicaton-toolkit.md)
* [OpenTracing Tracer](/en/Opentracing.md)
* Logging
* [log4j](/en/Application-toolkit-log4j-1.x.md)
* [log4j2](/en/Application-toolkit-log4j-2.x.md)
* [logback](/en/Application-toolkit-logback-1.x.md)
* [Trace](/en/Application-toolkit-trace.md)
* Testing
* [Plugin Test](https://github.com/SkywalkingTest/agent-integration-test-report)
* [Java Agent Performance Test](https://skywalkingtest.github.io/Agent-Benchmarks/)
* Development Guides
* [Skywalking 3 Cross Process Propagation Headers Protocol, v1.0](/en/Skywalking-3-Cross-Process-Propagation-Headers-Protocol.md)
* FAQ
\ No newline at end of file
## 中文文档
* [项目简介](cn/sky-walking-documents-zh-contents.md)
* [快速入门](cn/Quick-start-chn.md)
* [部署单机collector](cn/3.2.3-%E5%8D%95%E6%9C%BA%E6%A8%A1%E5%BC%8F%E9%83%A8%E7%BD%B2Collector.md)
* [部署集群collector](cn/3.2.3-%E9%9B%86%E7%BE%A4%E6%A8%A1%E5%BC%8F%E9%83%A8%E7%BD%B2Collector.md)
* [部署探针Agent](cn/3.2.3-部署探针Agent.md)
* [部署Collector镜像](cn/3.2-部署Collector镜像.md)
* [中间件,框架与类库支持列表](cn/3.2.3-supported-list.md)
* [如何关闭特定插件](cn/3.2.2-Plugin-list-and-how-to-disable-plugin-zh.md)
* APM相关介绍资料
* [APM简介(百度百科)](http://baike.baidu.com/link?url=HizLjnUrwvXqPQ4fZH_MA81MA7R_sE-kpdEIfuUHf-yNHhPiEkA97_7FshVR6raiZL6pvbChTZSIgrC1lY6lhq.md)
* [OpenTracing中文版](https://github.com/opentracing-contrib/opentracing-specification-zh.md)
* [JVM内存管理与GC](cn/Memory-Usage-and-GC-info.md)
* Application Toolkit,应用程序工具包
* [概述](cn/sky-walking-application-toolkit-chn.md)
* [OpenTracing Tracer](cn/skywalking-opentracing-chn.md)
* 日志组件
* [log4j组件](cn/sky-walking-application-toolkit-log4j-1.x-chn.md)
* [log4j2组件](cn/sky-walking-application-toolkit-log4j-2.x-chn.md)
* [logback组件](cn/sky-walking-application-toolkit-logback-1.x-chn.md)
* [Trace](cn/sky-walking-application-toolkit-trace-chn.md)
* 测试用例
* [单插件测试用例](cn/Test-Cases-chn.md)
* [测试应用集群](cn/2.0-Demo-Application-Cluster-chn.md)
* 开发指南
* [工程编译指南](cn/How-to-build.md)
* [插件开发指南](cn/Plugin-Development-Guide.md)
* [跨进程追踪上下文传递协议](cn/Skywalking-3-Cross-Process-Propagation-Headers-Protocol-CN.md)
* [探针与Collector间网络协议,v3.2+](cn/How-to-communicate-with-the-collector%3F.md)
* FAQ
* [探针性能测试报告](https://skywalkingtest.github.io/Agent-Benchmarks/.md)
* [Trace查询有数据,但是没有拓扑图和JVM数据?](cn/Trace%E6%9F%A5%E8%AF%A2%E6%9C%89%E6%95%B0%E6%8D%AE%EF%BC%8C%E4%BD%86%E6%98%AF%E6%B2%A1%E6%9C%89%E6%8B%93%E6%89%91%E5%9B%BE%E5%92%8CJVM%E6%95%B0%E6%8D%AE.md)
* [加载探针,Console被GRPC日志刷屏](cn/加载探针,Console被GRPC日志刷屏.md)
\ No newline at end of file
* Dependency the toolkit, such as using maven or gradle
```xml
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-toolkit-log4j-1.x</artifactId>
<version>{project.release.version}</version>
</dependency>
```
&nbsp;&nbsp;&nbsp;[ ![Download](https://api.bintray.com/packages/wu-sheng/skywalking/org.skywalking.apm-toolkit-log4j-1.x/images/download.svg) ](https://bintray.com/wu-sheng/skywalking/org.skywalking.apmg-toolkit-log4j-1.x/_latestVersion)
* Config a layout
```properties
log4j.appender.CONSOLE.layout=org.skywalking.apm.toolkit.log.log4j.v1.x.TraceIdPatternLayout
```
* set `%T` in `layout.ConversionPattern` ( In 2.0-2016, you should use %x, [Why change?](https://github.com/wu-sheng/sky-walking/issues/77) )
```properties
log4j.appender.CONSOLE.layout.ConversionPattern=%d [%T] %-5p %c{1}:%L - %m%n
```
* When you use `-javaagent` to active the sky-waking tracer, log4j will output **traceId**, if it existed. If the tracer is inactive, the output will be `TID: N/A`.
* Dependency the toolkit, such as using maven or gradle
```xml
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-toolkit-log4j-2.x</artifactId>
<version>{project.release.version}</version>
</dependency>
```
&nbsp;&nbsp;&nbsp;[ ![Download](https://api.bintray.com/packages/wu-sheng/skywalking/org.skywalking.apm-toolkit-log4j-2.x/images/download.svg) ](https://bintray.com/wu-sheng/skywalking/org.skywalking.apm-toolkit-log4j-2.x/_latestVersion)
* Config the `[%traceId]` pattern in your log4j2.xml
```xml
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d [%traceId] %-5p %c{1}:%L - %m%n"/>
</Console>
</Appenders>
```
* When you use `-javaagent` to active the sky-waking tracer, log4j2 will output **traceId**, if it existed. If the tracer is inactive, the output will be `TID: N/A`.
\ No newline at end of file
* Dependency the toolkit, such as using maven or gradle
```xml
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>skywalking-toolkit-logback-1.x</artifactId>
<version>{project.release.version}</version>
</dependency>
```
&nbsp;&nbsp;&nbsp;[ ![Download](https://api.bintray.com/packages/wu-sheng/skywalking/org.skywalking.apm-toolkit-logback-1.x/images/download.svg) ](https://bintray.com/wu-sheng/skywalking/org.skywalking.apm-toolkit-logback-1.x/_latestVersion)
* set `%tid` in `Pattern` section of logback.xml
```xml
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="com.a.eye.skywalking.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%tid] [%thread] %-5level %logger{36} -%msg%n</Pattern>
</layout>
</encoder>
</appender>
```
* When you use `-javaagent` to active the sky-waking tracer, logback will output **traceId**, if it existed. If the tracer is inactive, the output will be `TID: N/A`.
\ No newline at end of file
* Dependency the toolkit, such as using maven or gradle
```xml
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-toolkit-trace</artifactId>
<version>${skywalking.version}</version>
</dependency>
```
&nbsp;&nbsp;&nbsp;[ ![Download](https://api.bintray.com/packages/wu-sheng/skywalking/org.skywalking.apm-toolkit-trace/images/download.svg) ](https://bintray.com/wu-sheng/skywalking/org.skywalking.apm-toolkit-trace/_latestVersion)
* Use `TraceContext.traceId()` API to obtain traceId.
```java
import org.skywalking.apm.toolkit.trace.TraceContext;
...
modelAndView.addObject("traceId", TraceContext.traceId());
```
_Sample codes only_
* Add `@Trace` to any method you want to trace. After that, you can see the span in the Stack.
\ No newline at end of file
# What's sky-walking application toolkit?
Sky-walking application toolkit is a batch of libraries, provided by skywalking APM. Using them, you have a bridge between your application and skywalking APM agent.
_**Most important**_, they will not trigger any runtime or performance issues for your application, whether skywalking tracer is active or not.
# What does bridge mean?
As you known, skywalking agent run by -javeagent VM parameter. So you definitely don't need to change even a single line of your codes. But in some cases, you want to do interop with tracing/APM system. This is the moment you want to use application toolkit.
e.g.
1. Integrate trace context(traceId) into your log component, e.g. log4j, log4j2 and logback.
1. Use CNCF OpenTracing for manually instrumentation.
1. Use Skywalking annotation and interop APIs.
_**Notice**: all toolkits librarries are on bitray.com/jcenter. And make sure their version should be as same as the tracer's version._
\ No newline at end of file
## Required of third party softwares
- JDK 6+(instruments application can run in jdk6)
- JDK8 ( skywalking collector and skywalking webui )
- Elasticsearch 5.2.2 or 5.3, cluster mode or not
- Zookeeper 3.4.10
## Download released version
- Go to [released page](https://github.com/OpenSkywalking/skywalking/releases)
## Deploy Elasticsearch server
- Modify `elasticsearch.yml`
- Set `cluster.name: CollectorDBCluster`
- Set `node.name: anyname`, this name can be any, it based on Elasticsearch.
- Add the following configurations to
```
# The ip used for listening
network.host: 0.0.0.0
thread_pool.bulk.queue_size: 1000
```
- Start Elasticsearch
## Single Node Mode Collector
Single Node collector is easy to deploy, and provides same features as cluster mode. You can use almost all default config to run in this mode. And attention, all the default configs of single node mode, depend on running the collector, traced application, ElasticSearch and Zookeeper in the same machine.
### Deploy collector servers
1. Run `tar -xvf skywalking-collector.tar.gz`
1. Run `bin/startup.sh`
- `config/application.yml`
```
cluster:
# The address of Zookeeper
zookeeper:
hostPort: localhost:2181
sessionTimeout: 100000
# IPs in agent_server, agent_stream, ui, collector_inside are addresses of Collector
agent_server:
jetty:
host: localhost
# The port used
port: 10800
context_path: /
agent_stream:
grpc:
host: localhost
port: 11800
jetty:
host: localhost
port: 12800
context_path: /
ui:
jetty:
host: localhost
port: 12800
context_path: /
collector_inside:
grpc:
host: localhost
port: 11800
storage:
elasticsearch:
cluster_name: CollectorDBCluster
cluster_transport_sniffer: true
# The address of Elastic Search
cluster_nodes: localhost:9300
index_shards_number: 2
index_replicas_number: 0
```
## Cluster Mode Collector
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 agent_server, agent_stream, ui, collector_inside, replace them to the real ip or hostname which you want to use for cluster.
# Usage scenario
Standalong mode collector means don't support cluster. It uses H2 as storage layer implementation, suggest that use only for preview, test, demonstration, low throughputs and small scale system.
# Requirements
* JDK 8+
# Download
* [Releases](https://github.com/OpenSkywalking/skywalking/releases)
# Quick start
You can simplely tar/unzip and startup if ports 10800, 11800, 12800 are free.
- `tar -xvf skywalking-collector.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.
# Use Elastic Search instead of H2 as storage layer implementation
Even in standalone mode, collector can run with Elastic Search as storage. If so, uncomment the `storage` section in `application.yml`, set the config right.
- [Download source code](https://github.com/OpenSkywalking/skywalking/releases) and unzip source package. Execute following command under the unzipped directory.
```shell
> docker-compose pull
> docker-compose up
```
- The REST-service of collector listening on localhost:10800
- Open http://localhost:8080
Attention: The Docker Compose is only designed for you to run collector in your local machine. If you are running by using our provided docker compose, you can't access the ip:10800.
---
Test environment : docker 17.03.1-ce, docker compose 1.11.2
## Download skywalking agent release version
- Go to [release page](https://github.com/wu-sheng/sky-walking/releases)
## Deploy skywalking javaagent
1. Copy the agent package to anywhere you like. The logs, plugins and config are all included in the package.
2. Add -javaagent:/path/to/skywalking-agent/skywalking-agent.jar to VM argument.
New agent package looks like this:
```
+-- skywalking-agent
+-- activations
apm-toolkit-log4j-1.x-activation.jar
apm-toolkit-log4j-2.x-activation.jar
apm-toolkit-logback-1.x-activation.jar
...
+-- config
agent.config
+-- plugins
apm-dubbo-plugin.jar
apm-feign-default-http-9.x.jar
apm-httpClient-4.x-plugin.jar
.....
skywalking-agent.jar
```
- Start your application。
# Advanced features
- All plugins are in `/plugin` folder. The plugin jar is active when it is in there. Remove the plugin jar, it disabled.
- Besides set config through `/config/agent.config`, you can use System.Env and System.Properties(-D) to set config.
- Key of env and properties = `skywalking.` + key in `agent.config` file
- Priority: System.Env > System.Properties(-D) > `/config/agent.config`
- The default logging output folder is `/log`.
# Deploy agent in Tomcat FAQ
- Tomcat 7
Change the first line of `tomcat/bin/catalina.sh`.
```shell
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/skywalking-agent/skywalking-agent.jar"; export CATALINA_OPTS
```
- Tomcat 8
Change the first line of `tomcat/bin/catalina.sh`.
```shell
set "CATALINA_OPTS=... -javaagent:E:\apache-tomcat-8.5.20\skywalking-agent\skywalking-agent.jar -Dconfig=\skywalking\config\dir"
```
\ No newline at end of file
# Disable plugins
Delete or remove the specific libraries / jars in `skywalking-agent/plugins/*.jar`
```
+-- skywalking-agent
+-- activations
apm-toolkit-log4j-1.x-activation.jar
apm-toolkit-log4j-2.x-activation.jar
apm-toolkit-logback-1.x-activation.jar
...
+-- config
agent.config
+-- plugins
apm-dubbo-plugin.jar
apm-feign-default-http-9.x.jar
apm-httpClient-4.x-plugin.jar
.....
skywalking-agent.jar
```
\ No newline at end of file
* Dependency the toolkit, such as using maven or gradle
```xml
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-toolkit-opentracing</artifactId>
<version>{project.release.version}</version>
</dependency>
```
&nbsp;&nbsp;&nbsp;[ ![Download](https://api.bintray.com/packages/wu-sheng/skywalking/org.skywalking.apm-toolkit-opentracing/images/download.svg) ](https://bintray.com/wu-sheng/skywalking/org.skywalking.apm-toolkit-opentracing/_latestVersion)
* Use our OpenTracing tracer implementation
```java
Tracer tracer = new org.skywalking.apm.toolkit.opentracing.SkywalkingTracer();
Tracer.SpanBuilder spanBuilder = tracer.buildSpan("/yourApplication/yourService");
```
\ No newline at end of file
# Quick start
1. Deploy Collector
1. [Standalone Mode](Deploy-collector-in-standalone-mode.md)
1. [Cluster Mode](Deploy-collector-in-cluster-mode.md)
1. Deploy webui server, [doc](https://github.com/OpenSkywalking/skywalking-ui#quickstart)
1. Doploy Java Agent,[doc](Deploy-skywalking-agent.md)
1. Reboot your applications, and open UI.
\ No newline at end of file
# Skywalking 3 Cross Process Propagation Headers Protocol
* Version 1.0
This is the first open edition about `Skywalking 3 Cross Process Propagation Headers Protocol`. The skywalking is more likely an APM system, rather than normal distributed tracing system. The Headers is much more complex than them in order to improving analysis performance of collector. You can find many similar mechanism in other commercial APM system.(Some even much more complex than us)
# Header Item
* Header Name: `sw3`
* Header Value: Split by `|`, the parts are following.
## Values
* Trace Segment Id
The trace segment id is the unique id for the part of the distributed trace. Each id is only used in a single thread. The id includes three parts(Long), e.g. `"1.2343.234234234`
1) The first one represents application instance id, which assigned by collector. (most likely just an integer value, would be helpful in protobuf)
2) The second one represents thread id. (In Java most likely just an integer value, would be helpful in protobuf)
3) The third one also has two parts
1) A timestamp, measured in milliseconds
2) A seq, in current thread, between 0(included) and 9999(included)
If you are using other language, you can generate your own id, but make sure it is unique and combined by three longs.
* Span Id
An integer, unique in a trace segment. Start with 0;
* Parent Application Instance
The instance id of the parent node, e.g. for a server of RPC, this id is from the client application instance id.
* Entry Application Instance
The instance id of the entry application. e.g. A distributed trace `A->B->C`, the id is from `A`.
* Peer Host
The peer-host/peer-id from client side. e.g. client uses `182.14.39.1:9080` to access server, this ip:port is the peer host.
_This value can use exchange/compress collector service to get the id(integer) to represent the string. If you use the string, it must start with `#`, others use integer directly._
* Entry Span Operation Name of First Trace Segment
The operation name/id of entry span propagates from `Entry Application Instance`.
_This value can use exchange/compress collector service to get the id(integer) to represent the string. If you use the string, it must start with `#`, others use integer directly._
* Entry Span Operation Name of Parent Trace Segment
The operation name/id of entry span propagates from `Parent Application Instance`.
_This value can use exchange/compress collector service to get the id(integer) to represent the string. If you use the string, it must start with `#`, others use integer directly._
* Distributed Trace Id
The distributed trace id of the whole trace, if in a batch process, it comes from the trace of first batch producer. The rule is as same as `Trace Segment Id` with three Longs.
### Sample value
1. `1.2343.234234234|1|1|1|#127.0.0.1:8080|#/portal/|#/testEntrySpan|1.2343.234234234`
1. `1.2343.234234234|1|1|1|#127.0.0.1:8080|#/portal/|1038|1.2343.234234234`
\ No newline at end of file
* HTTP Server
* [Tomcat](https://github.com/apache/tomcat) 7
* [Tomcat](https://github.com/apache/tomcat) 8
* [Spring Boot](https://github.com/spring-projects/spring-boot) Web 4.x
* Spring MVC 3.x, 4.x with servlet 3.x
* [Nutz Web Framework](https://github.com/nutzam/nutz) 1.x
* [Struts2 MVC](http://struts.apache.org/) 2.3.x -> 2.5.x
* [Resin](http://www.caucho.com/resin-4.0/) 3
* [Resin](http://www.caucho.com/resin-4.0/) 4
* [Jetty Server](http://www.eclipse.org/jetty/) 9
* HTTP Client
* [Feign](https://github.com/OpenFeign/feign) 9.x
* [Netflix Spring Cloud Feign](https://github.com/spring-cloud/spring-cloud-netflix/tree/master/spring-cloud-starter-feign) 1.1.x, 1.2.x, 1.3.x
* [Okhttp](https://github.com/square/okhttp) 3.x
* [Apache httpclientcomponent](http://hc.apache.org/) 4.2, 4.3
* [Spring RestTemplete](https://github.com/spring-projects/spring-framework) 4.x
* [Jetty Client](http://www.eclipse.org/jetty/) 9
* JDBC
* Mysql Driver 5.x, 6.x
* Oracle Driver
* H2 Driver
* [Sharding-JDBC 1.5.x](https://github.com/shardingjdbc/sharding-jdbc)
* PostgreSQL Driver 8.x, 9.x, 42.x
* RPC Frameworks
* [Dubbo](https://github.com/alibaba/dubbo) 2.5.3
* [Dubbox](https://github.com/dangdangdotcom/dubbox) 2.8.4
* [Motan](https://github.com/weibocom/motan) 0.2
* [gRPC](https://github.com/grpc/grpc-java) 1.6+
* NoSQL
* Redis
* [Jedis](https://github.com/xetorthio/jedis) 2.8
* [MongoDB Java Driver](https://github.com/mongodb/mongo-java-driver) 3.4+
* Memcached Client
* [Spymemcached](https://github.com/couchbase/spymemcached) 2.x
* [Xmemcached](https://github.com/killme2008/xmemcached) 2.x
* Service Discovery
* [Netflix Eureka](https://github.com/Netflix/eureka)
* Spring Ecosystem
* Spring Core Async SuccessCallback/FailureCallback/ListenableFutureCallback 4.x
* OpenTracing community supported
* Motan
* Hprose-java
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册