diff --git a/README.md b/README.md index 52de90d309e53c0e40d310a81a1644488ad43873..d030b72b9aad34d8f2b4694465867e56e2080129 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Apache SkyWalking Sky Walking logo -**SkyWalking**: APM (application performance monitor) tool for distributed systems, especially designed for +**SkyWalking**: an observability analysis platform, also an APM(application performance monitor) system, especially designed for microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures. [![GitHub stars](https://img.shields.io/github/stars/apache/incubator-skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/incubator-skywalking) @@ -16,40 +16,44 @@ microservices, cloud native and container-based (Docker, Kubernetes, Mesos) arch [![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io) # Abstract -**SkyWalking** started as a distributed tracing system in 2015. From 5.x, it evolved to the fully functional [Application Performance Management](https://en.wikipedia.org/wiki/Application_performance_management) -system. It is used for tracing, monitoring, diagnose distributed systems, especially based on microservices, cloud native and container, -including: -- Distributed tracing and context propagation -- Application, instance, service metrics analysis +**SkyWalking** provides the observability and analysis platform, including monitoring, tracing, diagnosing capabilities for distributed system. + +- Service, service instance, endpoint metrics analysis - Root cause analysis -- Application topology map analysis -- Application and service dependency analysis -- Slow service detected +- Service topology map analysis +- Service, service instance and endpoint dependency analysis +- Slow services and endpoints detected - Performance optimization +- Distributed tracing and context propagation +- Alarm + + -# Core features -- Multiple languages instrumentation agent or libraries - - Native Java auto instrumentation agent. Trace and monitor your cluster without changing any source codes - - Community instrumentation agent or libraries + +SkyWalking provides multiple probes to collect data from different sources. +- SkyWalking native instrument agents or SDKs + - Auto instrument agents + * Java. Included in official release. * [.NET Core](https://github.com/OpenSkywalking/skywalking-netcore) * [Node.js](https://github.com/OpenSkywalking/skywalking-nodejs) -- Multiple storage backends: ElasticSearch, H2 -- [OpenTracing](http://opentracing.io/) compatible - - Native Java auto instrumentation agent could work with OpenTracing APIs in the same context -- Lightweight and powerful backend aggregation and analysis capabilities -- Modern and cool Web UI -- Log integration -- Alarm for slow or unstable(low SLA) application, instance and service -- [**Incubating**] Support accepting other tracer data formats. + - SDKs + * OpenCensus with SkyWalking exporter. +- Service mesh control panel or data panel probes. + - Istio mixer adaptor. + - Linkerd. +- 3rd party data tracing format. - Zipkin JSON, Thrift, Protobuf v1 and v2 formats, powered by [OpenZipkin](https://github.com/openzipkin/zipkin) libs - - Jaeger in [Zipkin Thrift or JSON v1/v2 formats](https://github.com/jaegertracing/jaeger#backwards-compatibility-with-zipkin) + - Jaeger in [Zipkin Thrift or JSON v1/v2 formats](https://github.com/jaegertracing/jaeger#backwards-compatibility-with-zipkin). + +# Recommend and typical usages +1. All service are under SkyWalking native agents or SDKs monitoring. +2. Service mesh probes. +3. Service mesh probes + distributed tracing(SkyWalking's or 3rd-party's). + # Document - [Documents in English](docs/README.md) -- [Documents in Chinese](docs/README_ZH.md) -# 5.x Architecture - # Code of conduct This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wusheng@apache.org. diff --git a/README_ZH.md b/README_ZH.md deleted file mode 100644 index d93527f0b204e2f91ece0b63d856f050589b38a0..0000000000000000000000000000000000000000 --- a/README_ZH.md +++ /dev/null @@ -1,81 +0,0 @@ -Apache SkyWalking | [English](README.md) -========== - -Sky Walking logo - -**SkyWalking**: 针对分布式系统的APM(应用性能监控)系统,特别针对微服务、cloud native和容器化(Docker, Kubernetes, Mesos)架构 - -[![GitHub stars](https://img.shields.io/github/stars/apache/incubator-skywalking.svg?style=for-the-badge&label=Stars&logo=github)](https://github.com/apache/incubator-skywalking) -[![Twitter Follow](https://img.shields.io/twitter/follow/asfskywalking.svg?style=for-the-badge&label=Follow&logo=twitter)](https://twitter.com/AsfSkyWalking) - - -[![Maven Central](https://img.shields.io/maven-central/v/org.apache.skywalking/apache-skywalking-apm-incubating.svg)](http://skywalking.apache.org/downloads/) -[![Build Status](https://travis-ci.org/apache/incubator-skywalking.svg?branch=master)](https://travis-ci.org/apache/incubator-skywalking) -[![Join the chat at https://gitter.im/openskywalking/Lobby](https://badges.gitter.im/openskywalking/Lobby.svg)](https://gitter.im/openskywalking/Lobby) -[![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io) - -# Abstract -**SkyWalking** 创建于2015年,提供分布式追踪功能。从5.x开始,项目进化为一个完成功能的[Application Performance Management](https://en.wikipedia.org/wiki/Application_performance_management)系统。 -他被用于追踪、监控和诊断分布式系统,特别是使用微服务架构,云原生或容积技术。提供以下主要功能: -- 分布式追踪和上下文传输 -- 应用、实例、服务性能指标分析 -- 根源分析 -- 应用拓扑分析 -- 应用和服务依赖分析 -- 慢服务检测 -- 性能优化 - -# Core features -- 多语言探针或类库 - - Java自动探针,追踪和监控程序时,不需要修改源码。 - - 社区提供的其他多语言探针 - * [.NET Core](https://github.com/OpenSkywalking/skywalking-netcore) - * [Node.js](https://github.com/OpenSkywalking/skywalking-nodejs) -- 多种后端存储: ElasticSearch, H2 -- 支持[OpenTracing](http://opentracing.io/) - - Java自动探针支持和OpenTracing API协同工作 -- 轻量级、完善功能的后端聚合和分析 -- 现代化Web UI -- 日志集成 -- 应用、实例和服务的告警 -- [**Incubating**]支持接口其他探针的数据 - - 接受Zipkin v1 v2格式数据,采用JSON, Thrift, Protobuf序列化方式。Powered by [OpenZipkin](https://github.com/openzipkin/zipkin) libs - - 接受Jaeger 使用 [Zipkin Thrift 或 JSON v1/v2 格式](https://github.com/jaegertracing/jaeger#backwards-compatibility-with-zipkin) - -# Document -- [英文文档](docs/README.md) -- [中文文档](docs/README_ZH.md) - -# 5.x Architecture - - -# code of conduct -This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wusheng@apache.org. - - -# Live Demo -- 北京服务器. [前往](http://49.4.12.44:8080/) - -# Screenshot - - - -- [查看所有系统截图](/docs/Screenshots.md) - -# Compiling project -查看[编译指南](https://github.com/apache/incubator-skywalking/blob/master/docs/cn/How-to-build-CN.md) - -# Contact Us -* 直接提交Issue -- 订阅邮件列表: dev@skywalking.apache.org -* [Gitter](https://gitter.im/openskywalking/Lobby) -* QQ群: 392443393 - -# Users - - -[报告新的用户案例](https://github.com/apache/incubator-skywalking/issues/443) - - -# License -[Apache 2.0 License.](/LICENSE) diff --git a/docs/README_ZH.md b/docs/README_ZH.md deleted file mode 100644 index 55230f195e71b54498433b230a73fc29c912d9cd..0000000000000000000000000000000000000000 --- a/docs/README_ZH.md +++ /dev/null @@ -1,51 +0,0 @@ -## 中文文档 -[![EN doc](https://img.shields.io/badge/document-English-blue.svg)](README.md) - -注:中文文档由社区志愿者提供,官方文档以英文为准。 - - * 快速入门 - * [快速入门](cn/Quick-start-CN.md) - * [中间件,框架与类库支持列表](Supported-list.md) - * [如何关闭特定插件](cn/How-to-disable-plugin-CN.md) - * [可选插件](cn/Optional-plugins-CN.md) - * 高级特性 - * [通过系统启动参数进行覆盖配置](cn/Setting-override-CN.md) - * [服务直连(Direct uplink)及禁用名称服务(naming service)](cn/Direct-uplink-CN.md) - * [开启TLS](cn/TLS-CN.md) - * [命名空间隔离](cn/Namespace-CN.md) - * [基于Token认证](cn/Token-auth-CN.md) - * 孵化特性 - * [个性化服务过滤](../apm-sniffer/optional-plugins/trace-ignore-plugin/README_CN.md) - * [使用Shardingjdbc作为存储实现](cn/Use-ShardingJDBC-as-storage-implementor-CN.md) - * APM相关介绍资料 - * [OpenTracing中文版](https://github.com/opentracing-contrib/opentracing-specification-zh) - * Application Toolkit,应用程序工具包 - * [概述](cn/Application-toolkit-CN.md) - * [使用SkyWalking的OpenTracing的兼容API](cn/Opentracing-CN.md) - * 日志组件集成 - * [log4j组件](cn/Application-toolkit-log4j-1.x-CN.md) - * [log4j2组件](cn/Application-toolkit-log4j-2.x-CN.md) - * [logback组件](cn/Application-toolkit-logback-1.x-CN.md) - * [使用SkyWalking手动追踪API](cn/Application-toolkit-trace-CN.md) - * [跨线程任务追踪](cn/Application-toolkit-trace-cross-thread-CN.md) - * 测试用例 - * [插件测试](https://github.com/SkywalkingTest/agent-integration-test-report) - * [Java 探针性能测试](https://skywalkingtest.github.io/Agent-Benchmarks/README_zh.html) - * 开发指南 - * [工程编译指南](cn/How-to-build-CN.md) - * [插件开发指南](cn/Plugin-Development-Guide-CN.md) - * 交互协议 - * [Cross Process Propagation Headers Protocol, v1.0 跨进程追踪上下文传递协议](cn/Skywalking-Cross-Process-Propagation-Headers-Protocol-CN-v1.md) - * [SkyWalking Trace Data Protocol 探针与Collector间网络协议](cn/Trace-Data-Protocol-CN.md) - * [Roadmap](ROADMAP.md) - * 社区提供的共享资源 - * [公开演讲](https://github.com/OpenSkywalking/Community#public-speakings) - * [视频](https://github.com/OpenSkywalking/Community#videos) - * [文章](https://github.com/OpenSkywalking/Community#articles) - * FAQ - * [Trace查询有数据,但是没有拓扑图和JVM数据?](cn/FAQ/Why-have-traces-no-others-CN.md) - * [加载探针,Console被GRPC日志刷屏](cn/FAQ/Too-many-gRPC-logs-CN.md) - * [Kafka消息消费端链路断裂](cn/FAQ/Kafka-plugin-CN.md) - * [Protoc-Plugin Maven编译时异常](cn/FAQ/Protoc-Plugin-Fails-When-Build-CN.md) - * [EnhanceRequireObjectCache 类转换异常](cn/FAQ/EnhanceRequireObjectCache-Cast-Exception-CN.md) - * [skywalking导入eclipse依赖项目异常](cn/FAQ/Import-Project-Eclipse-RequireItems-Exception.md) diff --git a/docs/cn/Application-toolkit-CN.md b/docs/cn/Application-toolkit-CN.md deleted file mode 100644 index e3551fbc4524b51b128f80b9c747fee70e2b9699..0000000000000000000000000000000000000000 --- a/docs/cn/Application-toolkit-CN.md +++ /dev/null @@ -1,11 +0,0 @@ -# 什么是sky-walking应用程序工具包? -Sky-walking应用程序工具包是一系列的类库,由skywalking团队提供。通过这些类库,你可以在你的应用程序内,访问sky-walking的一些内部信息. - -_**最为重要的是**_, 即使你移除skywalking的探针,或者不激活探针,这些类库也不会对应用程序有任何影响,也不会影响性能. - -# 工具包提供以下核心能力 -1. 将追踪信息和log组件集成,如log4j, log4j2 和 logback -1. 兼容CNCF OpenTracing标准的手动埋点 -1. 使用Skywalking专有的标注和交互性API - -_**注意**: 所有的应用程序工具包都托管在bitray.com/jcenter. 同时请确保你使用的开发工具包和skywalking的agent探针版本一致._ \ No newline at end of file diff --git a/docs/cn/Application-toolkit-log4j-1.x-CN.md b/docs/cn/Application-toolkit-log4j-1.x-CN.md deleted file mode 100644 index bf4891f7de89cd5e4594757e951a58b277e177ad..0000000000000000000000000000000000000000 --- a/docs/cn/Application-toolkit-log4j-1.x-CN.md +++ /dev/null @@ -1,20 +0,0 @@ -* 使用 maven 和 gradle 依赖相应的工具包 -```xml - - org.apache.skywalking - apm-toolkit-log4j-1.x - {project.release.version} - -``` - -* 配置layout -```properties -log4j.appender.CONSOLE.layout=TraceIdPatternLayout -``` - -* 在`layout.ConversionPattern`中设置 `%T`来展示traceid ( 在 2.0-2016版本中, 你应该设置为 %x, [为什么改变配置,请参考相关issue?](https://github.com/wu-sheng/sky-walking/issues/77) ) -```properties -log4j.appender.CONSOLE.layout.ConversionPattern=%d [%T] %-5p %c{1}:%L - %m%n -``` - -* 当你使用`-javaagent`参数激活sky-walking的探针, 如果当前上下文中存在traceid,log4j将在输出**traceId**。如果探针没有被激活,将输出`TID: N/A`. diff --git a/docs/cn/Application-toolkit-log4j-2.x-CN.md b/docs/cn/Application-toolkit-log4j-2.x-CN.md deleted file mode 100644 index a9c4e51422be8ae992bd228a30bdef68b1e108b0..0000000000000000000000000000000000000000 --- a/docs/cn/Application-toolkit-log4j-2.x-CN.md +++ /dev/null @@ -1,18 +0,0 @@ -* 使用 maven 和 gradle 依赖相应的工具包 -```xml - - org.apache.skywalking - apm-toolkit-log4j-2.x - {project.release.version} - -``` - -* 在log4j2.xml中的pattern 配置节,配置`[%traceId]` -```xml - - - - - -``` -* 当你使用`-javaagent`参数激活sky-walking的探针, 如果当前上下文中存在traceid,log4j2将在输出**traceId**。如果探针没有被激活,将输出`TID: N/A`. diff --git a/docs/cn/Application-toolkit-logback-1.x-CN.md b/docs/cn/Application-toolkit-logback-1.x-CN.md deleted file mode 100644 index 2a18f1146914e712bbf0501159586e510b11e4ec..0000000000000000000000000000000000000000 --- a/docs/cn/Application-toolkit-logback-1.x-CN.md +++ /dev/null @@ -1,21 +0,0 @@ -* 使用 maven 和 gradle 依赖相应的工具包 -```xml - - org.apache.skywalking - apm-toolkit-logback-1.x - {project.release.version} - -``` - -* 在logback.xml中的`Pattern`配制节中,设置`%tid` -```xml - - - - %d{yyyy-MM-dd HH:mm:ss.SSS} [%tid] [%thread] %-5level %logger{36} -%msg%n - - - -``` - -* 当你使用`-javaagent`参数激活sky-walking的探针, 如果当前上下文中存在traceid,logback将在输出**traceId**。如果探针没有被激活,将输出`TID: N/A`. diff --git a/docs/cn/Application-toolkit-trace-CN.md b/docs/cn/Application-toolkit-trace-CN.md deleted file mode 100644 index c0f58c73f8acd1c213dfeb90e2e8547b1f0f3976..0000000000000000000000000000000000000000 --- a/docs/cn/Application-toolkit-trace-CN.md +++ /dev/null @@ -1,23 +0,0 @@ -* 使用 maven 和 gradle 依赖相应的工具包 -```xml - - org.apache.skywalking - apm-toolkit-trace - ${skywalking.version} - -``` - -* 随时使用 `TraceContext.traceId()` API,在应用程序的任何地方获取traceId. -```java -import TraceContext; -... - -modelAndView.addObject("traceId", TraceContext.traceId()); -``` -_示例代码,仅供参考_ - -* 对任何需要追踪的方法,使用 `@Trace` 标注,则此方法会被加入到追踪链中。 -* 在被追踪的方法中自定义 tag. -```java -ActiveSpan.tag("my_tag", "my_value"); -``` diff --git a/docs/cn/Application-toolkit-trace-cross-thread-CN.md b/docs/cn/Application-toolkit-trace-cross-thread-CN.md deleted file mode 100644 index 4094ebe345dac3dd007b0f1fcf9db5fc4fec5257..0000000000000000000000000000000000000000 --- a/docs/cn/Application-toolkit-trace-cross-thread-CN.md +++ /dev/null @@ -1,47 +0,0 @@ -# 跨线程追踪 -* 使用 maven 和 gradle 依赖相应的工具包 -```xml - - org.apache.skywalking - apm-toolkit-trace - ${skywalking.version} - -``` - -* 使用方式一. -```java - @TraceCrossThread - public static class MyCallable implements Callable { - @Override - public String call() throws Exception { - return null; - } - } -... - ExecutorService executorService = Executors.newFixedThreadPool(1); - executorService.submit(new MyCallable()); -``` -* 使用方式二. -```java - ExecutorService executorService = Executors.newFixedThreadPool(1); - executorService.submit(CallableWrapper.of(new Callable() { - @Override public String call() throws Exception { - return null; - } - })); -``` -或者 -```java - ExecutorService executorService = Executors.newFixedThreadPool(1); - executorService.execute(RunnableWrapper.of(new Runnable() { - @Override public void run() { - //your code - } - })); -``` -_示例代码,仅供参考_ - - - - - diff --git a/docs/cn/Deploy-backend-in-cluster-mode-CN.md b/docs/cn/Deploy-backend-in-cluster-mode-CN.md deleted file mode 100644 index d506d0acbb67887f82220e8b6b14e42c6a1e6a71..0000000000000000000000000000000000000000 --- a/docs/cn/Deploy-backend-in-cluster-mode-CN.md +++ /dev/null @@ -1,122 +0,0 @@ -## 所需的第三方软件 -- 被监控程序要求JDK6+ -- SkyWalking collector和WebUI要求JDK8+ -- Elasticsearch 5.x -- Zookeeper 3.4.10 - -## 下载发布版本 -- 前向[发布页面](http://skywalking.apache.org/downloads/) - -## 部署Elasticsearch -- 修改`elasticsearch.yml`文件 - - 设置 `cluster.name: CollectorDBCluster`。此名称需要和collector配置文件一致。 - - 设置 `node.name: anyname`, 可以设置为任意名字,如Elasticsearch为集群模式,则每个节点名称需要不同。 - - 增加如下配置 - -``` -# ES监听的ip地址 -network.host: 0.0.0.0 -thread_pool.bulk.queue_size: 1000 -``` - -- 启动Elasticsearch - -### 部署collector -1. 解压安装包`tar -xvf skywalking-collector.tar.gz`,windows用户可以选择zip包 -2. 设置Collector集群模式 - -集群模式主要依赖Zookeeper的注册和应用发现能力。所以,你只需要调整 `config/application.yml`中的host和port配置,使用实际IP和端口,代替默认配置。 -其次,将storage的注释取消,并修改为Elasticsearch集群的节点地址信息。 - - -- `config/application.yml` -``` -cluster: -# 配置zookeeper集群信息 - zookeeper: - hostPort: localhost:2181 - sessionTimeout: 100000 -naming: -# 配置探针使用的host和port -jetty: - host: localhost - port: 10800 - contextPath: / -remote: - gRPC: - host: localhost - port: 11800 -agent_gRPC: - gRPC: - host: localhost - port: 11800 -agent_jetty: - jetty: - host: localhost - port: 12800 - contextPath: / -analysis_register: - default: -analysis_jvm: - default: -analysis_segment_parser: - default: - bufferFilePath: ../buffer/ - bufferOffsetMaxFileSize: 10M - bufferSegmentMaxFileSize: 500M -ui: - jetty: - host: localhost - port: 12800 - contextPath: / -# 配置 Elasticsearch 集群连接信息 -storage: - elasticsearch: - clusterName: CollectorDBCluster - clusterTransportSniffer: true - clusterNodes: localhost:9300 - indexShardsNumber: 2 - indexReplicasNumber: 0 - highPerformanceMode: true - # 设置统计指标数据的失效时间,当指标数据失效时系统将数据自动删除. - traceDataTTL: 90 # 单位为分 - minuteMetricDataTTL: 90 # 单位为分 - hourMetricDataTTL: 36 # 单位为小时 - dayMetricDataTTL: 45 # 单位为天 - monthMetricDataTTL: 18 # 单位为月 -configuration: - default: -# namespace: xxxxx -# 告警阀值 - applicationApdexThreshold: 2000 - serviceErrorRateThreshold: 10.00 - serviceAverageResponseTimeThreshold: 2000 - instanceErrorRateThreshold: 10.00 - instanceAverageResponseTimeThreshold: 2000 - applicationErrorRateThreshold: 10.00 - applicationAverageResponseTimeThreshold: 2000 -# 热力图配置,修改配置后需要删除热力指标统计表,由系统重建 - thermodynamicResponseTimeStep: 50 - thermodynamicCountOfResponseTimeSteps: 40 -``` - - -3. 运行`bin/startup.sh`启动。windows用户为.bat文件。 - - -### 部署UI - -1. 解压安装包 `tar -xvf skywalking-dist.tar.gz`,windows用户可以选择zip包 -2. 配置UI集群模式. - -UI的配置信息保存在 `webapp/webapp.yml` 中. - -| 配置项 | 描述 | -|----------------------------------|----------------------------------------------------------------------------------| -| `server.port` | 监听端口 | -| `collector.ribbon.listOfServers` | collector命名服务地址.(与 `config/application.yml` 中的`naming.jetty`配置保持相同 ),多个Collector地址以`,`分割 | -| `collector.path` | Collector查询uri. 默认: /graphql | -| `collector.ribbon.ReadTimeout` | 查询超时时间. 默认: 10 秒 | -| `security.user.*` | 登录用户名/密码. 默认: admin/admin | - -3. 运行 `bin/webappService.sh` diff --git a/docs/cn/Deploy-backend-in-standalone-mode-CN.md b/docs/cn/Deploy-backend-in-standalone-mode-CN.md deleted file mode 100644 index 23c00bb7c1c1747f924d0615c50fd2228becc290..0000000000000000000000000000000000000000 --- a/docs/cn/Deploy-backend-in-standalone-mode-CN.md +++ /dev/null @@ -1,39 +0,0 @@ -# 用途说明 -单机模式默认使用本地H2数据库,不支持集群部署。主要用于:预览、功能测试、演示和低压力系统。 - -如果使用单机collector用于非演示环境,你可选择使用Elasticsearch作为存储实现。 - -**在5.0.0-alpha版本中,暂不提供H2实现, 所以在启动之前,必须先部署ElasticSearch** - -## 所需的第三方软件 -- JDK8+ - -## 下载发布版本 -- 前向[发布页面](http://skywalking.apache.org/downloads/) - -## Quick Start -Collector单机模拟启动简单,提供和集群模式相同的功能,单机模式下除端口(8080, 10800, 11800, 12800)被占用的情况下,直接启动即可。 - -## 部署后台服务 -1. 解压安装包`tar -xvf skywalking-collector.tar.gz`,windows用户可以选择zip包 -1. 运行`bin/startup.sh`启动。windows用户为.bat文件。 - -- **注意:在5.0.0-alpha 版本中,startup.sh将会启动collector和UI两个进程,UI通过127.0.0.1:10800访问本地collector,无需额外配置。** - -## 使用Elastic Search代替H2存储 -- 在单机模式下,`collector`也支持其他的存储(当前已支持的ElasticSearch 5.3),取消 `application.yml`配置文件中的`storage` 相关配置节的注释,并修改配置,默认的配置是`collector` -和 `Elasticsearch` 运行在同一台机器上。 - -## 部署Elasticsearch -- 修改`elasticsearch.yml`文件 - - 设置 `cluster.name: CollectorDBCluster`。此名称需要和collector配置文件一致。 - - 设置 `node.name: anyname`, 可以设置为任意名字,如Elasticsearch为集群模式,则每个节点名称需要不同。 - - 增加如下配置 - -``` -# ES监听的ip地址 -network.host: 0.0.0.0 -thread_pool.bulk.queue_size: 1000 -``` - -- 启动Elasticsearch diff --git a/docs/cn/Deploy-skywalking-agent-CN.md b/docs/cn/Deploy-skywalking-agent-CN.md deleted file mode 100644 index 1dd07aae70593ff02082e29b20a13a0c61ff93d6..0000000000000000000000000000000000000000 --- a/docs/cn/Deploy-skywalking-agent-CN.md +++ /dev/null @@ -1,89 +0,0 @@ -## 下载skywalking探针发布版本 -- 前向[发布页面](http://skywalking.apache.org/downloads/) - -## 部署探针 -1. 拷贝skywalking-agent目录到所需位置,探针包含整个目录,请不要改变目录结构 -1. 增加JVM启动参数,`-javaagent:/path/to/skywalking-agent/skywalking-agent.jar`。参数值为skywalking-agent.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 -``` - -- `/config/agent.config`包含探针所需配置,中文说明如下。 - -```properties -# 当前的应用编码,最终会显示在webui上。 -# 建议一个应用的多个实例,使用有相同的application_code。请使用英文 -agent.application_code=Your_ApplicationName - -# 每三秒采样的Trace数量 -# 默认为负数,代表在保证不超过内存Buffer区的前提下,采集所有的Trace -# agent.sample_n_per_3_secs=-1 - -# 设置需要忽略的请求地址 -# 默认配置如下 -# agent.ignore_suffix=.jpg,.jpeg,.js,.css,.png,.bmp,.gif,.ico,.mp3,.mp4,.html,.svg - -# 探针调试开关,如果设置为true,探针会将所有操作字节码的类输出到/debugging目录下 -# skywalking团队可能在调试,需要此文件 -# agent.is_open_debugging_class = true - -# 对应Collector的config/application.yml配置文件中 agent_server/jetty/port 配置内容 -# 例如: -# 单节点配置:SERVERS="127.0.0.1:8080" -# 集群配置:SERVERS="10.2.45.126:8080,10.2.45.127:7600" -collector.servers=127.0.0.1:10800 - -# 日志文件名称前缀 -logging.file_name=skywalking-agent.log - -# 日志文件最大大小 -# 如果超过此大小,则会生成新文件。 -# 默认为300M -logging.max_file_size=314572800 - -# 日志级别,默认为DEBUG。 -logging.level=DEBUG -``` - -- 启动被监控应用。 - -# 高级特性 -- 插件会被统一放置在`plugins`目录中,新的插件,也只需要在启动阶段,放在目录中,就自动生效。删除则失效。 -- 配置除了通过`/config/agent.config`文件外,可以通过环境变量和VM参数(-D)来进行设置 - - 参数的key = `skywalking.` + `agent.config`文件中的key - - 优先级:系统环境变量 > VM参数(-D) > `/config/agent.config`中的配置 -- Log默认使用文件输出,输出到`/logs`目录中 - -# Tomcat配置探针FAQ -- Linux Tomcat 7, Tomcat 8 -修改`tomcat/bin/catalina.sh`,在首行加入如下信息 -```shell -CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/skywalking-agent/skywalking-agent.jar"; export CATALINA_OPTS -``` - -- Windows Tomcat 7, Tomcat 8 -修改`tomcat/bin/catalina.bat`,在首行加入如下信息 -```shell -set "CATALINA_OPTS=-javaagent:/path/to/skywalking-agent/skywalking-agent.jar" -``` -- JAR 部署 -修改启动命令添加启动参数`-javaagent` - ```shell - java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar yourApp.jar - ``` - diff --git a/docs/cn/Direct-uplink-CN.md b/docs/cn/Direct-uplink-CN.md deleted file mode 100644 index 096d570d5aae54e51c8dba2165473cdc626a04d6..0000000000000000000000000000000000000000 --- a/docs/cn/Direct-uplink-CN.md +++ /dev/null @@ -1,31 +0,0 @@ -# 服务直连(Direct uplink) -## 版本支持 -5.0.0-beta + - -## 什么是服务直连(Direct uplink)? -默认情况下, `SkyWalking`探针使用 名称服务(naming service,即通过名称获取服务地址)的形式获取 `collector`的地址连接gRPC服务. - - **服务直连** 意味着在名称服务不可用或者低可用的情况下,在探针端直接使用设置的gRPC的地址进行连接. - -## 为什么需要这样做? -如果探针通过以下代理上报数据: -1. 私有云(VPCs) -1. 公网(Internet) -1. 不同的子网(subnet). -1. Ip,Port代理 - -## 探针配置 -1. 去掉配置 `collector.servers` . -2. 在 `agent.config`中按照如下配置 -``` -# Collector agent_gRPC/grpc 地址. -# 仅仅当不配置的"collector.servers"的时候生效,作为第二种配置地址选择. -# 如果使用此配置,自动发现服务将无法使用,探针将直接使用此地址进行数据上报. -# 仅仅当探针端无法连接到`collector`的集群 ip地址时,我们才推荐使用这种配置,比如: -# 1. 探针和 `collector`在不同的私有云当中. -# 2. 探针通过外网上报数据到 `collector`. -# collector.direct_servers=www.skywalking.service.io -``` - -3. 可以只用域名或者IP:PORT形式(逗号分割) 来设置`collector.direct_servers`. - diff --git a/docs/cn/FAQ/EnhanceRequireObjectCache-Cast-Exception-CN.md b/docs/cn/FAQ/EnhanceRequireObjectCache-Cast-Exception-CN.md deleted file mode 100644 index 63f7c867c6d1c5e0e1b19bccddd035e72bc9f660..0000000000000000000000000000000000000000 --- a/docs/cn/FAQ/EnhanceRequireObjectCache-Cast-Exception-CN.md +++ /dev/null @@ -1,19 +0,0 @@ -### 现象 -agent 启动日志出现如下错误,无法将`EnhanceRequireObjectCache`转换为`EnhanceRequireObjectCache`,无法正常上报数据 -```java -ERROR 2018-05-07 21:31:24 InstMethodsInter : class[class org.springframework.web.method.HandlerMethod] after method[getBean] intercept failure -java.lang.ClassCastException: org.apache.skywalking.apm.plugin.spring.mvc.commons.EnhanceRequireObjectCache cannot be cast to org.apache.skywalking.apm.plugin.spring.mvc.commons.EnhanceRequireObjectCache - at org.apache.skywalking.apm.plugin.spring.mvc.commons.interceptor.GetBeanInterceptor.afterMethod(GetBeanInterceptor.java:45) - at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:105) - at org.springframework.web.method.HandlerMethod.getBean(HandlerMethod.java) - at org.springframework.web.servlet.handler.AbstractHandlerMethodExceptionResolver.shouldApplyTo(AbstractHandlerMethodExceptionResolver.java:47) - at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:131) - at org.springframework.web.servlet.handler.HandlerExceptionResolverComposite.resolveException(HandlerExceptionResolverComposite.java:76) - ... -``` - -### 原因 -此类错误见于开发环境使用了热部署(`spring-boot-devtool`)或者其他类似的工具, `classloader` 变更导致. -### 解决方法 -1. 此错误不会影响生产环境使用[spring-boot-devtools说明](https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html) -2. 开发环境如果想正常调试,可以暂时在开发环境去掉此包进行调试. diff --git a/docs/cn/FAQ/Import-Project-Eclipse-RequireItems-Exception.md b/docs/cn/FAQ/Import-Project-Eclipse-RequireItems-Exception.md deleted file mode 100644 index 854bb87c337157c49c591164cabc2add0e52ef1b..0000000000000000000000000000000000000000 --- a/docs/cn/FAQ/Import-Project-Eclipse-RequireItems-Exception.md +++ /dev/null @@ -1,16 +0,0 @@ -### 现象 -- 导入skywalking工程到eclipse,遇到如下异常 -- Cannot complete the install because one or more required items could not be found. - Software being installed: Checkstyle configuration plugin for M2Eclipse 1.0.0.201705301746 (com.basistech.m2e.code.quality.checkstyle.feature.feature.group - 1.0.0.201705301746) - Missing requirement: Checkstyle configuration plugin for M2Eclipse 1.0.0.201705301746 (com.basistech.m2e.code.quality.checkstyle.feature.feature.group - 1.0.0.201705301746) requires 'net.sf.eclipsecs.core 5.2.0' but it could not be found - -### 原因 -未安装Eclipse Checkstyle Plug-in插件 - -### 解决方法 -用这个地址下载https://sourceforge.net/projects/eclipse-cs/?source=typ_redirect,Eclipse Checkstyle Plug-in 版本号8.7.0.201801131309 插件安装就可以了。 -插件说明: -The Eclipse Checkstyle plug-in integrates the Checkstyle Java code auditor into the Eclipse IDE. The plug-in provides real-time feedback to the user about -violations of rules that check for coding style and possible error prone code constructs. \ No newline at end of file diff --git a/docs/cn/FAQ/Kafka-plugin-CN.md b/docs/cn/FAQ/Kafka-plugin-CN.md deleted file mode 100644 index b5c093ddd6a0d719e2236d960273f77be024cc00..0000000000000000000000000000000000000000 --- a/docs/cn/FAQ/Kafka-plugin-CN.md +++ /dev/null @@ -1,8 +0,0 @@ -### 现象 -Kafka消息消费端链路断裂 - -### 原因 -Kafka探针只是追踪了对Kafka的拉取动作,而整个后续处理过程不是由kafka consumer发起。故,需要在消费处理的发起点,进行手动埋点。 - -### 解决方法 - 可以通过Application Toolkit中的 `@Trace` 标注,或者OpenTracing API进行手动埋点。 diff --git a/docs/cn/FAQ/Protoc-Plugin-Fails-When-Build-CN.md b/docs/cn/FAQ/Protoc-Plugin-Fails-When-Build-CN.md deleted file mode 100644 index b7ca7a0a3b6433ed9c0270a62396211ff47e683a..0000000000000000000000000000000000000000 --- a/docs/cn/FAQ/Protoc-Plugin-Fails-When-Build-CN.md +++ /dev/null @@ -1,11 +0,0 @@ -### 现象 - maven编译加载protoc-plugins插件产生如下错误: -``` -[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile-custom (default) on project apm-network: Unable to copy the file to \incubator-skywalking\apm-network\target\protoc-plugins: \incubator-skywalking\apm-network\target\protoc-plugins\protoc-3.3.0-linux-x86_64.exe (另一个程序正在使用此文件,进程无法访问。) -> [Help 1] -``` - -### 原因 - Protobuf编译器依赖于glibc环境,部分linux操作系统未安装或未升级该函数库会产生该问题。 - -### 解决方法 - 检查并升级最新版本glibc库,若使用容器镜像环境推荐含有最新版本glibc的alpine系统。请参考官方手册:http://www.gnu.org/software/libc/documentation.html diff --git a/docs/cn/FAQ/Too-many-gRPC-logs-CN.md b/docs/cn/FAQ/Too-many-gRPC-logs-CN.md deleted file mode 100644 index 3c56e8d105cf864f7ac8cde18330ffd724656b14..0000000000000000000000000000000000000000 --- a/docs/cn/FAQ/Too-many-gRPC-logs-CN.md +++ /dev/null @@ -1,9 +0,0 @@ -### 现象 -1. 加载探针并启动应用 -2. Console中被GRPC日志刷屏 - -### 原因 -Skywalking采用了GRPC框架发送数据,GRPC框架读取log的配置文件进行日志输出。 - -### 解决方法 -在log的配置文件中添加对`org.apache.skywalking.apm.dependencies`包的过滤 diff --git a/docs/cn/FAQ/Why-have-traces-no-others-CN.md b/docs/cn/FAQ/Why-have-traces-no-others-CN.md deleted file mode 100644 index 9faa95f8569285a73c3b0974d167a7cef7c71f0d..0000000000000000000000000000000000000000 --- a/docs/cn/FAQ/Why-have-traces-no-others-CN.md +++ /dev/null @@ -1,10 +0,0 @@ -### 现象 -- Agent和Collector正常工作,没有异常日志 -- 已经对系统进行过访问,Trace查询有数据 -- UI除Trace查询页面外,其他页面无数据 - -### 原因 -Collector和被监控应用的系统主机时间,没有同步。 - -### 解决方法 -同步各主机操作系统时间。 diff --git a/docs/cn/How-to-build-CN.md b/docs/cn/How-to-build-CN.md deleted file mode 100644 index 461ca2d0f7acf50c7b5e8d5473e8b16410cd5cd5..0000000000000000000000000000000000000000 --- a/docs/cn/How-to-build-CN.md +++ /dev/null @@ -1,51 +0,0 @@ -## 工程编译指南 -本文档用于指导开发者,在本地开发环境中编译工程。 - -### 前言 -因为工程结构和代码依赖会随版本变化,如果读者熟悉travis-ci,则可直接参考[.travis.yml](../../.travis.yml) - -**工程使用Git Submodule,所以不建议使用GitHub的tag和release页面的源码下载,来编译工程** - -### 从GitHub下载代码编译 -1. 准备环境: git, jdk8,Maven -1. `git clone https://github.com/apache/incubator-skywalking.git` -1. `cd incubator-skywalking/` -1. 切换到tag `git checkout [tagname]` (可选,当需要编译发行版本时,请是切换到指定分支) -1. `git submodule init` -1. `git submodule update` -1. 执行`mvn clean package -DskipTests` -1. 生成包在`/dist`目录下(.tar.gz是linux环境,.zip是windows环境) - -### 从Apache源码镜像下载编译 -1. 准备环境: jdk8,Maven -1. 执行`mvn clean package -DskipTests` -1. 生成包在`/dist`目录下(.tar.gz是linux环境,.zip是windows环境) - - -## 在IntelliJ IDEA中编译工程 -上述步骤在命令行中,能够很好的编译工程,但导入到编译器中的工程依然会有一些报错,我们需要进行几步简单的操作。 -1. 在IntelliJ Terminal中,执行`mvn compile -Dmaven.test.skip=true`进行编译 -1. 设置gRPC的自动生成代码目录,为源码目录 - - **apm-protocol/apm-network/target/generated-sources/protobuf**目录下的`grpc-java`和`java`目录 - - **apm-collector/apm-collector-remote/apm-remote-grpc-provider/target/generated-sources/protobuf**目录下的`grpc-java`和`java`目录 - -## 编译Resin-3, Resin-4 和 Oracle JDBC 驱动插件 -为了遵守Apache关于协议(License)的相关要求,不符合Apache相关要求的类库所对应的Plugin不会自动编译。如需编译对应的插件, -需要手动下载驱动或类库,并将文件拷贝到`ci-dependencies/`中,运行`mvn package`进行编译。 - -`ci-dependencies/`下对应的类库文件名为: -* resin-3.0.9.jar -* resin-4.0.41.jar -* ojdbc14-10.2.0.4.0.jar - -## FAQ -### npm install超时失败 -如果在编译apm-webapp时碰到下载包失败问题,可以将apm-webapp中pom.xml中npm源地址修改为淘宝的源,在中国的访问速度可以大大提高. - -``` -install --registry=https://registry.npmjs.org/ -``` -修改为 -``` -install --registry=https://registry.npm.taobao.org/ -``` diff --git a/docs/cn/How-to-disable-plugin-CN.md b/docs/cn/How-to-disable-plugin-CN.md deleted file mode 100644 index 84cfc82bc4c1e5b102ad2b3fe2aabf69aa81b345..0000000000000000000000000000000000000000 --- a/docs/cn/How-to-disable-plugin-CN.md +++ /dev/null @@ -1,19 +0,0 @@ -# Disable plugins -删除plugin目录下的相关jar包:`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 diff --git a/docs/cn/Namespace-CN.md b/docs/cn/Namespace-CN.md deleted file mode 100644 index dfd0ecaff2c3cd2bf21643a893452c87cc0822c3..0000000000000000000000000000000000000000 --- a/docs/cn/Namespace-CN.md +++ /dev/null @@ -1,37 +0,0 @@ -# 命名空间 -## 版本支持 -5.0.0-beta + - -## 需求背景 -SkyWalking是一个用于从分布式系统收集指标的监控工具。 在实际环境中,一个非常大的分布式系统包括数百个应用程序,数千个应用程序实例。 在这种情况下,更大可能的不止一个组, -甚至还有一家公司正在维护和监控分布式系统。 他们每个人都负责不同的部分,不能共享某些指标。 - -在这种情况下,命名空间就应运而生了,它用来隔离追踪和监控数据. - -## 配置命名空间 -### 在探针配置中配置 agent.namespace -```properties -# The agent namespace -# agent.namespace=default-namespace -``` - -默认情况下 `agent.namespace` 是没有配置的. - -**影响** -默认情况下,SkyWalking 设置的key是 `sw3`, 更多信息查看[文档](Skywalking-Cross-Process-Propagation-Headers-Protocol-CN-v1.md). -配置好 `agent.namespace` 之后, key 就被设置为`namespace:sw3`. - -当双方使用不同的名称空间时,跨进程传播链会中断。 - -### collector 中设置命名空间 -```yml -configuration: - default: - namespace: xxxxx -``` - -**影响** -1. 如果使用 `zookeeper`开启了集群模式,`zookeeper`的路径会变为带有命名空间前缀的的路径. -1. 如果使用`Elasticsearch` 进行存储,所有的`type` 名称会带有命名空间的前缀. - - diff --git a/docs/cn/Opentracing-CN.md b/docs/cn/Opentracing-CN.md deleted file mode 100644 index 3bb3d2a3773a16bd5b0a690c8279a94fd1f787b5..0000000000000000000000000000000000000000 --- a/docs/cn/Opentracing-CN.md +++ /dev/null @@ -1,15 +0,0 @@ -* 使用 maven 和 gradle 依赖相应的工具包 -```xml - - org.apache.skywalking - apm-toolkit-opentracing - {project.release.version} - -``` - -* 使用OpenTracing的标准API和桥接器,使用手动埋点 -```java -Tracer tracer = new org.apache.skywalking.apm.toolkit.opentracing.SkywalkingTracer(); -Tracer.SpanBuilder spanBuilder = tracer.buildSpan("/yourApplication/yourService"); - -``` diff --git a/docs/cn/Optional-plugins-CN.md b/docs/cn/Optional-plugins-CN.md deleted file mode 100644 index fea89817f47ea02819bedba426d0bb3b8d059bc8..0000000000000000000000000000000000000000 --- a/docs/cn/Optional-plugins-CN.md +++ /dev/null @@ -1,21 +0,0 @@ -# 可选插件 -可选插件可以由源代码或者agent下的`optional-plugins`文件夹中提供。 - -为了使用这些插件,你需要自己编译源代码,或将某些插件复制到`/plugins`。 - -## Spring bean 插件 -这个插件允许在Spring上下文中追踪带有`@Bean`、 `@Service`、`@Component`和`@Repository`注解的bean的所有方法。 - -- 为什么这个插件是可选的? -在Spring上下文中追踪所有方法会创建很多的span,也会消耗更多的CPU,内存和网络。 -当然你希望包含尽可能多的span,但请确保你的系统有效负载能够支持这些。 - -## Oracle and Resin 插件 -由于Oracle和Resin的License,这些插件无法在Apache发行版中提供。 -如果你想了解详细信息,请阅读 [Apache license legal document](https://www.apache.org/legal/resolved.html) - -- 我们应该如何在本地构建这些可选插件? - -1. Resin 3: 下载Resin 3.0.9 并且把jar放在`/ci-dependencies/resin-3.0.9.jar`. -1. Resin 4: 下载Resin 4.0.41 并且把jar放在`/ci-dependencies/resin-4.0.41.jar`. -1. Oracle: 下载Oracle OJDBC-14 Driver 10.2.0.4.0 并且把jar放在`/ci-dependencies/ojdbc14-10.2.0.4.0.jar`. diff --git a/docs/cn/Plugin-Development-Guide-CN.md b/docs/cn/Plugin-Development-Guide-CN.md deleted file mode 100644 index 83f19305ef742c8d1838d6e24861adbaec527b3b..0000000000000000000000000000000000000000 --- a/docs/cn/Plugin-Development-Guide-CN.md +++ /dev/null @@ -1,283 +0,0 @@ -## 插件开发指南 -这边文档描述插件的开发和贡献方法 - -## 核心概念 -### 一. Span -Span是追踪系统中的通用概念(有时候被翻译成埋点),关于Span的定义,请参考[OpenTracing 中文版](https://github.com/opentracing-contrib/opentracing-specification-zh/blob/master/specification.md#opentracing数据模型)。 - -SkyWalking作为OpenTracing的支持者,在核心实现中,与标准有较高的相似度。当然,作为实际产品的需要,我们一会扩展相关概念。 - -我们将span分为三类: - -1.1 EntrySpan -EntrySpan代表一个服务的提供方,即,服务端的入口点。它是每个Java对外服务的入口点。如:Web服务入口就是一个EntrySpan。 - -1.2 LocalSpan -LocalSpan代表一个普通的Span,代表任意一个本地逻辑块(或方法) - -1.3 ExitSpan -ExitSpan也可以称为LeafSpan(SkyWalking的早期版本中的称呼),代表了一个远程服务的客户端调用。如:一次JDBC调用。 - -### 二. ContextCarrier -分布式追踪要解决的一个重要问题,就是跨进程调用链连接的问题,ContextCarrier的概念就是为了解决这种场景。 - -当发生一次**A->B**的网络调用时: -1. 创建一个空的ContextCarrier -1. 通过`ContextManager#createExitSpan`方法创建一个ExitSpan,或者使用`ContextManager#inject`,在过程中传入并初始化`ContextCarrier` -1. 将`ContextCarrier`中所有元素放入请求头(如:HTTP头)或消息正文(如 Kafka) -1. `ContextCarrier`随请求传输到服务端 -1. 服务端收到后,转换为新的ContextCarrier -1. 通过`ContestManager#createEntrySpan`方法创建EntrySpan,或者使用`ContextManager#extract`,建立分布式调用关联 - - -以HTTPComponent调用Tomcat为例: -1. 客户端(HTTPComponent端) -```java - span = ContextManager.createExitSpan("/span/operation/name", contextCarrier, "ip:port"); - CarrierItem next = contextCarrier.items(); - while (next.hasNext()) { - next = next.next(); - httpRequest.setHeader(next.getHeadKey(), next.getHeadValue()); - } -``` - -2. 服务端(Tomcat端) -```java - ContextCarrier contextCarrier = new ContextCarrier(); - CarrierItem next = contextCarrier.items(); - while (next.hasNext()) { - next = next.next(); - next.setHeadValue(request.getHeader(next.getHeadKey())); - } - - span = ContextManager.createEntrySpan(“/span/operation/name”, contextCarrier); -``` - -### 三. ContextSnapshot -除了跨进程的RPC调用,另外一种追踪的常见场景是跨线程保持链路连接。跨线程和跨进程有很高的相似度,都是需要完成上下文的传递工作。 -所以ContextSnapshot具有和ContextCarrier十分类似的API风格。 - -当发生一次**A->B**的跨线程调用时: -1. 需要在A线程中通过ContextManager#capture操作生成ContextSnapshot对象实例 -1. 将这个ContextSnapshot对象传递到B线程中 -1. B线程通过ContextManager#continued操作完成上下文传递 - -## 核心API -### 一. ContextManager -ContextManager提供了追踪相关操作的主入口 - -1. 创建EntrySpan -```java -public static AbstractSpan createEntrySpan(String operationName, ContextCarrier carrier) -``` -通过服务名、跨进程传递的ContextCarrier,创建EntrySpan。 - -2. 创建LocalSpan -```java -public static AbstractSpan createLocalSpan(String operationName) -``` -根据服务名(或方法名),创建LocalSpan - -3. 创建ExitSpan -```java -public static AbstractSpan createExitSpan(String operationName, ContextCarrier carrier, String remotePeer) -``` -根据服务名,跨进程传递的ContextCarrier(空容器)和远端服务地址(IP、主机名、域名 + 端口),创建ExitSpan - -### 二. AbstractSpan -AbstractSpan提供了Span内部,进行操作的各项API - -```java - /** - * Set the component id, which defines in {@link ComponentsDefine} - * - * @param component - * @return the span for chaining. - */ - AbstractSpan setComponent(Component component); - - /** - * Only use this method in explicit instrumentation, like opentracing-skywalking-bridge. - * It it higher recommend don't use this for performance consideration. - * - * @param componentName - * @return the span for chaining. - */ - AbstractSpan setComponent(String componentName); - - AbstractSpan setLayer(SpanLayer layer); - - /** - * Set a key:value tag on the Span. - * - * @return this Span instance, for chaining - */ - AbstractSpan tag(String key, String value); - - /** - * Record an exception event of the current walltime timestamp. - * - * @param t any subclass of {@link Throwable}, which occurs in this span. - * @return the Span, for chaining - */ - AbstractSpan log(Throwable t); - - AbstractSpan errorOccurred(); - - /** - * Record an event at a specific timestamp. - * - * @param timestamp The explicit timestamp for the log record. - * @param event the events - * @return the Span, for chaining - */ - AbstractSpan log(long timestamp, Map event); - - /** - * Sets the string name for the logical operation this span represents. - * - * @return this Span instance, for chaining - */ - AbstractSpan setOperationName(String operationName); -``` -Span的操作语义和OpenTracing类似。 - -SpanLayer为我们的特有概念,如果是远程调用类的服务,请设置此属性,包括5个属性值 -1. UNKNOWN, 默认 -1. DB -1. RPC_FRAMEWORK,非HTTP类型的RPC框架,如:原生的DUBBO,MOTAN -1. HTTP -1. MQ - -Component ID被SkyWalking项目组定义和保护。0到10000为保留值,如果你希望贡献新插件,可以在插件pull request通过,并提交的自动化 -测试用户被接收后,申请自己的组件ID。私有插件,请使用10000以上的ID,避免重复。 - -## 开发插件 -### 一. 简介 -因为所有的程序调用都是基于方法的,所以插件实际上就是基于方法的拦截,类似面向切面编程的AOP技术。SkyWalking底层已经完成相关的技术封装,所以插件开发者只需要定位需要拦截的类、方法,然后结合上文中的追踪API,即可完成插件的开发。 - -### 二. 拦截类型 -根据Java方法,共有三种拦截类型 -1. 拦截构造函数 -1. 拦截实例方法 -1. 拦截静态方法 - -我们将这三类拦截,分为两类,即: -1. 实例方法增强插件,继承ClassInstanceMethodsEnhancePluginDefine -1. 静态方法增强插件,继承ClassStaticMethodsEnhancePluginDefine - -当然,也可以同时支持实例和静态方法,直接继承ClassEnhancePluginDefine。但是,这种情况很少。 - -### 三. 实现自己的插件定义 -我们以继承ClassInstanceMethodsEnhancePluginDefine为例(ClassStaticMethodsEnhancePluginDefine十分类似,不再重复描述),描述定义插件的全过程 - -1. 定义目标类名称 -```java -protected abstract ClassMatch enhanceClass(); -``` - -ClassMatch反应类的匹配方式,目前提供四种: - -* byName, 通过类名完整匹配 -* byClassAnnotationMatch, 通过类标注进行匹配 -* byMethodAnnotationMatch, 通过方法的标注来匹配类 -* byHierarchyMatch, 通过父类或者接口匹配 - -注意实现: -* 所有类、接口、标注名称,请使用字符串,不要使用`*.class.getName()`(用户环境可能会引起ClassLoader问题)。 -* by*AnnotationMatch不支持继承的标注 -* byHierarchyMatch,如果存在接口、抽象类、类间的多层继承关系,如果方法复写,则可能造成多层埋点。 - -如: -```java -@Override -protected ClassMatch enhanceClassName() { - return byName("org.apache.catalina.core.StandardEngineValve"); -} - -``` - -2. 定义方法拦截点 -```java -protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints(); - -public interface InstanceMethodsInterceptPoint { - /** - * class instance methods matcher. - * - * @return methods matcher - */ - ElementMatcher getMethodsMatcher(); - - /** - * @return represents a class name, the class instance must instanceof InstanceMethodsAroundInterceptor. - */ - String getMethodsInterceptor(); - - boolean isOverrideArgs(); -} -``` - -返回拦截方法的匹配器,以及对应的拦截类,同样由于潜在的ClassLoader问题,不要使用`*.class.getName()`。如何构建拦截器,请章节"四. 实现拦截器逻辑"。 - -3. 定义skywalking-plugin.def文件 -```properties -tomcat-7.x/8.x=TomcatInstrumentation -``` - -* 插件名称,要求全局唯一,命名规范:目标组件+版本号 -* 插件定义类全名 - -### 四. 实现拦截器逻辑 -我们继续以实现实例方法拦截为例,拦截器需要实现org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor。 -```java -/** - * A interceptor, which intercept method's invocation. The target methods will be defined in {@link - * ClassEnhancePluginDefine}'s subclass, most likely in {@link ClassInstanceMethodsEnhancePluginDefine} - * - * @author wusheng - */ -public interface InstanceMethodsAroundInterceptor { - /** - * called before target method invocation. - * - * @param result change this result, if you want to truncate the method. - * @throws Throwable - */ - void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, - MethodInterceptResult result) throws Throwable; - - /** - * called after target method invocation. Even method's invocation triggers an exception. - * - * @param ret the method's original return value. - * @return the method's actual return value. - * @throws Throwable - */ - Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, - Object ret) throws Throwable; - - /** - * called when occur exception. - * - * @param t the exception occur. - */ - void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, - Throwable t); -} -``` - -可以在方法执行前、执行后、执行异常三个点,进行拦截,设置修改方法参数(执行前),并调用核心API,设置追踪逻辑。 - -## 贡献插件到主仓库 -我们鼓励大家共同贡献支持各个类库的插件。 - -大家需支持以下步骤执行: -1. 在issue页面提出插件扩展需求,对应的版本。 -1. Fork apache/incubator-skywalking到本地 -1. 在apm-sniffer/apm-sdk-plugin下新建自己的插件模块,模块名为:支持类库名称+版本号 -1. 按照规范开发插件 -1. 完善注释和测试用例 -1. 在本地打包进行集成测试 -1. 提交Pull Request到 apache/incubator-skywalking,根据评审团队要求,提供相关自动化测试用例 -1. SkyWalking Committer成员完成插件审核,确定发布版本,并合并到主仓库。 diff --git a/docs/cn/Quick-start-CN.md b/docs/cn/Quick-start-CN.md deleted file mode 100644 index 1813beca80f97fed3b135094e2f31eb8e49b80e1..0000000000000000000000000000000000000000 --- a/docs/cn/Quick-start-CN.md +++ /dev/null @@ -1,8 +0,0 @@ -# 部署步骤 -1. 下载`apache-skywalking-apm-incubating-x.y.z.tar.gz` 或 `apache-skywalking-apm-incubating-x.y.z.zip` -1. 部署 Backend - 1. [单机模式](Deploy-backend-in-standalone-mode-CN.md) - 1. [集群模式](Deploy-backend-in-cluster-mode-CN.md) -1. 部署 Java Agent,[doc](Deploy-skywalking-agent-CN.md) -1. 重启并访问系统功能,查看UI即可。 -1. 登录页面的默认用户名/密码是`admin/admin`。 \ No newline at end of file diff --git a/docs/cn/Setting-override-CN.md b/docs/cn/Setting-override-CN.md deleted file mode 100644 index cef950e7b17c840bfc73663a7464c1e69a3a2609..0000000000000000000000000000000000000000 --- a/docs/cn/Setting-override-CN.md +++ /dev/null @@ -1,34 +0,0 @@ -# 覆盖配置 -## 版本支持 -5.0.0-beta + - -_探针的覆盖配置从 3.2.5版本就已经支持_ - -## 什么是覆盖配置? -默认情况下, SkyWalking 探针读取`agent.config` 配置文件, 服务端读取配置文件 `application.yml` . -覆盖配置表示用户可以通过启动参数(-D)来覆盖这些配置文件里面的配置. - -## 配置优先级 -启动参数配置(-D) > 配置文件 - -## 覆盖 -### 探针 -使用 `skywalking.` + key 的格式进行配置,覆盖配置文件中的配置. - -- 为什么需要这个前缀? - 探针和目标应用共享系统启动参数(环境)的配置,使用这个前缀可以避免变量冲突. -### Collector -使用配置文件中相同的 key ,在启动参数中覆盖`collector`中的配置. -例如: -- `application.yml`的配置: -```yaml -agent_gRPC: - gRPC: - host: localhost - port: 11800 -``` - -- 在启动脚本中使用如下启动参数配置将端口设置为31200. -``` --Dagent_gRPC.gRPC.port=31200 -``` \ No newline at end of file diff --git a/docs/cn/Skywalking-Cross-Process-Propagation-Headers-Protocol-CN-v1.md b/docs/cn/Skywalking-Cross-Process-Propagation-Headers-Protocol-CN-v1.md deleted file mode 100644 index 88455346716b1862a0bdaf92b4ecc6d223bda0b8..0000000000000000000000000000000000000000 --- a/docs/cn/Skywalking-Cross-Process-Propagation-Headers-Protocol-CN-v1.md +++ /dev/null @@ -1,63 +0,0 @@ -# Skywalking Cross Process Propagation Headers Protocol -* Version 1.0 - -Skywalking是一个偏向APM的分布式追踪系统,所以,为了提供服务端处理性能。头信息会比其他的追踪系统要更复杂一些。 -你会发现,这个头信息,更像一个商业APM系统,并且,一些商业APM系统的头信息,比我们的要复杂的多。 - -# Header Item -* Header Name: `sw3` -* Header Value: 使用`|`分隔,包含以下内容 - -_消息头使用sw3,因为此协议始于SkyWalking 3.x版本。_ - -## Values -* Trace Segment Id - -Trace segment,即分布式调用链片段。这个ID为此调用链片段全局唯一ID。此ID由一次分布式调用链的一个线程执行过程独享(在Java模型中)。ID由三个Long型组成,如: `"1.2343.234234234` - 1) 第一部分代表应用的实例ID(`application instance id`),此ID通过注册接口由Collector分配。一般取值范围为整形,利于protobuf传输。 - 2) 第二部分为线程号,Java模型中,一般也是整形。 - 3) 第三部分又由两部分组成 - 1) 时间戳,单位毫秒 - 2) 线程内的自增序列。0到9999之间。 - -如果你使用其他语言实现探针,你只需要保证你的ID由三个Long型构成,并全局唯一,不必完全遵守Java的ID生成规则。 - - -* Span Id - -一个整数,在trace segment内唯一,从0开始自增。 - -* Parent Application Instance - -父级应用节点的应用实例ID。如:在一个RPC调用中,HEAD中是客户端的应用实例ID。 - -* Entry Application Instance - -入口应用节点的应用实例ID。如:在一个分布式链路`A->B->C`中,此字段为`A`应用的实例ID。 - -* Peer Host - -服务端的Peer Host或Peer Id。如:客户端使用`182.14.39.1:9080`服务端,则这个就是对应的Peer Host。 - -_此值可以通过Collector服务获得对应的ID。如果非ID,则使用`#`开头,如果使用ID,则为整数类型。_ - -* Entry Span Operation Name of First Trace Segment - -调用链入口节点的应用实例下,入口Span的operation name或id。 - -_此值可以通过Collector服务获得对应的ID。如果非ID,则使用`#`开头,如果使用ID,则为整数类型。_ - -* Entry Span Operation Name of Parent Trace Segment - -调用链父级节点的应用实例下,入口Span的operation name或id。 - -_此值可以通过Collector服务获得对应的ID。如果非ID,则使用`#`开头,如果使用ID,则为整数类型。_ - -* Distributed Trace Id - -分布式链路ID一般是整个调用链的全局唯一ID。如果针对批量消费情况,这个ID是批量中,第一个生产者的trace ID。此ID生成规则和`Trace Segment Id`一致,由三个Long型数字构成。 - -### Sample value -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 diff --git a/docs/cn/TLS-CN.md b/docs/cn/TLS-CN.md deleted file mode 100644 index 3af94d1c0bdc66b43ff4de6875eb0757bda460d7..0000000000000000000000000000000000000000 --- a/docs/cn/TLS-CN.md +++ /dev/null @@ -1,43 +0,0 @@ -# 支持传输层安全TLS(Transport Layer Security) -在通过Internet传输数据时,传输层安全(TLS)是一种非常常见的安全方式 -用户可能会在一些场景下遇到这样的情形: - -> 被监控(部署探针)的应用中部署在同一个私有云(VPC)区域当中,与此同时, SkyWalking 的服务端部署在另一个私有云(VPC)区域中 -> -> 在这种情况下,就非常有必要做一些传输安全认证. - -## 配置要求 -开启 **服务直连** 功能, 详情参考 [文档](Direct-uplink-CN.md). - -由于通过公网直接上报数据,由于安全问题,名称(naming)服务机制并不适合这种情况.所以我们在HTTP服务的名称服务中不支持TLS。 - -## 版本支持 -5.0.0-beta + - -## 认证模式 -仅仅支持 **非双向认证**. -- 如果你比较熟悉如何生成 key 文件,可以使用 [脚本](../../tools/TLS/tls_key_generate.sh) . -- 在客户端使用 `ca.crt`文件 -- 在服务端使用 `server.crt` 和 `server.pem`. - -## 配置并开启 TLS - -### 探针配置 -- 将 `ca.crt` 放置在探针文件夹的 `/ca` 文件夹中. 需要注意的是,发行的版本中不包含`/ca`文件夹,需要自行创建. - -如果探针检测到文件 `/ca/ca.crt` ,会自动开启 TLS. - -### Collector 配置 - `agent_gRPC/gRPC` 模块支持 TLS. 并且现在只有这个模块支持. - -- 将`application.yml`中的 `ssl_cert_chain_file` 和 `ssl_private_key_file` 配置打开. -- `ssl_cert_chain_file` 配置为 `server.crt`的绝对路径. -- `ssl_private_key_file` 配置为 `server.pem`的绝对路径. - -## 避免端口共享 -在大多数情况下,我们建议在`agent_gRPC / gRPC`和`remote / gRPC`模块中共享所有gRPC服务的端口。 -但是,当你在`agent_gRPC / gRPC`模块中打开TLS时不要这样做,原因就是无论是否开始TLS,你都无法监听端口。 -解决方案, 换一个端口 `remote/gRPC/port`. - -## 其他端口监听如何操作? -请使用其他安全方式确保不能访问 VPC 区域外的其他端口,例如防火墙,代理等。 \ No newline at end of file diff --git a/docs/cn/Token-auth-CN.md b/docs/cn/Token-auth-CN.md deleted file mode 100644 index 131880ba58a3efe647fd5ba7383fe35b2eb077a7..0000000000000000000000000000000000000000 --- a/docs/cn/Token-auth-CN.md +++ /dev/null @@ -1,45 +0,0 @@ -# 基于 Token 认证 -## 版本支持 -5.0.0-beta + - -## 在使用了TLS 认证之后,为何还需要基于 Token 的认证? -TLS 是保证传输层的安全,保证传输的网络是可信的. -基于 token 的认证是为了保证应用的监控数据是 **可信的**. - -## Token -在现在的版本中, Token是一个简单的字符串. - -### 设置 Token -1. 在 agent.config 文件中设置 Token -```properties -# Authentication active is based on backend setting, see application.yml for more details. -agent.authentication = xxxx -``` - -2. 在 `application.yml` 文件中设置 token -```yaml -agent_gRPC: - gRPC: - host: localhost - port: 11800 - - #Set your own token to active auth - authentication: xxxxxx -``` - -## 认证失败 -collector验证来自探针的每个请求,只有 token 正确,验证才能通过。 - -如果token不正确,您将在探针端的日志看到如下日志: -``` -org.apache.skywalking.apm.dependencies.io.grpc.StatusRuntimeException: PERMISSION_DENIED -``` - -## FAQ -### 我可以只使用token认证而不用TLS? -不行. 从技术层面来说, 当然可以.但是token 和 TLS 用于不被信任的网络环境. 在这种情况下, TLS显得更加重要, token 认证仅仅在 TLS 认证的之后才能被信任, -如果在一个没有 TLS 的网络环节中, token非常容易被拦截和窃取. - -### 现在skywalking是否支持其他的认证机制? 比如 ak/sk? -现在还不支持,但是如果有人愿意提供这些这些新特性,我们表示感谢. - diff --git a/docs/cn/Trace-Data-Protocol-CN.md b/docs/cn/Trace-Data-Protocol-CN.md deleted file mode 100644 index 0e1a237d0ea596cd8b4c3bbe71c3557cdcd85385..0000000000000000000000000000000000000000 --- a/docs/cn/Trace-Data-Protocol-CN.md +++ /dev/null @@ -1,254 +0,0 @@ -# Trace Data Protocol 中文 -Trace Data Protocol协议,也就是探针与Collector间通讯协议 - -## 概述 -此协议包含了Agent上行/下行数据的格式,可用于定制开发,或者探针的多语言扩展 - -### 协议版本 -v1.1 - -### 协议类型 -* 服务发现使用HTTP服务 -* 注册和数据上行服务同时支持gRPC和HTTP JSON服务 - -#### gRPC协议定义文件 -[gRPC proto files](https://github.com/apache/incubator-skywalking-data-collect-protocol/tree/v1.1.1) - -## Collector服务发现协议 -### 简介 -**Collector服务发现协议是探针启动时,第一个调用的服务。** 通过服务,查找可用的gRPC服务地址列表,并在由客户端选择其中任意一个作为服务端。 -此服务建议周期性调用,确保探针本地的服务端口列表是准确有效的。 - -### 协议类型 -HTTP GET - -### 协议内容 -- 请求 -GET操作:http://collectorIp:port/agent/gRPC 。 其中`/agent/gRPC`是默认值,如需修改,需要参考collector相关配置。 - -- 返回 -JSON数组,数组的每个元素,为一个有效的gRPC服务地址。 -```json -["ip address1:port1","ip address2:port2","ip address3:port3"] -``` - -## 应用注册服务 -### 简介 -应用注册服务,是将applicationCode,转换成数字ID的服务。 -此服务会在后续的传输过程中,有效降低网络带宽需求。 - -### 协议内容 -[gRPC service define](https://github.com/apache/incubator-skywalking-data-collect-protocol/blob/v1.1.1/ApplicationRegisterService.proto) - -- applicationCode为客户端设置的应用名. -- applicationCode对应的返回id,在后续协议中,被称为applicationId。 - -## 应用实例发现服务 -### 简介 -应用实例发现服务存在三个子服务,分别是实例注册服务,实例心跳服务,实例注册重连服务。这三个服务负责获取和保持应用实例在线的功能。 - -### 协议类型 -gRPC服务 - -### 实例注册服务 -[gRPC service define](https://github.com/apache/incubator-skywalking-data-collect-protocol/blob/v1.1.1/DiscoveryService.proto#L29) - -- agentUUID 由探针生成,需保持唯一性,推荐使用UUID算法。并在应用重启前保持不变 -- applicationId 由**应用注册服务**获取。 -- 服务端返回应用实例id,applicationInstanceId 。后续上报服务使用实例id标识。 - -### 实例心跳服务 -[gRPC service define](https://github.com/apache/incubator-skywalking-data-collect-protocol/blob/v1.1.1/DiscoveryService.proto#L32) - -- 心跳服务每分钟上报一次。 -- 如果一分钟内有segment数据上报,则可不必上报心跳。 - -## 服务名注册发现服务 -### 简介 -服务名注册发现服务,是将应用内的服务名(operationName)替换为id的服务。 - -### 协议内容 -[gRPC service define](https://github.com/apache/incubator-skywalking-data-collect-protocol/blob/v1.1.1/DiscoveryService.proto#L70) - -- 可选服务,可有效降低网络消耗,推荐实现。注意,由于部分应用存在URI中夹带参数的情况,请注意限制探针内的缓存容量,防止内存溢出。 -- ServiceNameElement中,applicationId为当前applicationCode对应的id。serviceName一般为对应span的operationName - -## 地址注册发现服务 -### 简介 -地址注册发现服务,是将远程调用(RPC、MQ、DB...)地址的(addresses)替换为id的服务。 - -### 协议内容 -[gRPC service define](https://github.com/apache/incubator-skywalking-data-collect-protocol/blob/v1.1.1/NetworkAddressRegisterService.proto) - -- 可选服务,可有效降低网络消耗,推荐实现。 -- NetworkAddresses中,addresses为被调方的地址(IP/HOST:PORT)多个地址使用逗号分隔 - -## JVM指标上报服务 -### 简介 -上报当前实例的JVM信息,每秒上报一次。 - -### 协议内容 -[gRPC service define](https://github.com/apache/incubator-skywalking-data-collect-protocol/blob/v1.1.1/JVMMetricsService.proto) - -## TraceSegment上报服务 -### 简介 -上报调用链信息 - -### 协议内容 -[gRPC service define](https://github.com/apache/incubator-skywalking-data-collect-protocol/blob/v1.1.1/TraceSegmentService.proto) - -- UniqueId为segment或者globalTraceId的数字表示。由3个long组成,1)applicationInstanceId,2)当前线程id,3)当前时间戳*10000 + seq(0-10000自循环) -- Span的数据,请参考[插件开发规范](Plugin-Development-Guide-CN.md) -- 以下id和名称根据注册返回结果,优先上报id,无法获取id时,再上传name。参考之前的应用和服务注册章节。 - - operationNameId/operationName - - networkAddress/networkAddressId - - entryServiceName/entryServiceId - - parentServiceName/parentServiceId - - peerId/peer -- componentId为默认支持的插件id,非官方支持,需传输名称或修改服务端源代码。[官方组件列表](../../apm-protocol/apm-network/src/main/java/org/apache/skywalking/apm/network/trace/component/ComponentsDefine.java) - -### 协议类型 -HTTP JSON服务, 属性名与gRPC对应,属性解释详见gRPC协议说明,统一采用HTTP POST方式 - -### 实例注册服务 -地址: http://ip:port/instance/register(default: localhost:12800) - -输入: -``` -{ - ai: x, #applicationId - au: "", #agentUUID - rt: x, #registerTime - oi: "", #osinfo -} -``` - -输出: -``` -{ - ai: x, #applicationId - ii: x, #applicationInstanceId -} -``` - -### 实例心跳服务 -地址: http://ip:port/instance/heartbeat(default: localhost:12800) - -输入: -``` -{ - "ii": x, #applicationInstanceId - "ht": x #heartbeatTime, java timestamp format -} -``` - -输出:无 - -## 服务名注册发现服务 -地址: http://ip:port/servicename/discovery(default: localhost:12800) - -输入: -``` -{ - ai: x, #applicationId - sn: "", #serviceName - st: x, #srcSpanType -} -``` - -输出: -``` -{ - si: x, #osinfo - el: { #element - ai: x, #applicationId - sn: "", #serviceName - st: x, #srcSpanType - } -} -``` - -## JVM指标上报服务 -### 暂无支持需求,java和c#的探针都采用gRPC的方式上报 - -## TraceSegment上报服务 -### 一次可以发送多个Segment,采用JSON数组的形式 -输入: -``` -[ - { - "gt": [[230150, 185809, 24040000]], //globalTraceIds 链路编码,与调用方相同 - "sg": { //TraceSegmentObject - "ts": [137150, 185809, 48780000], //traceSegmentId,新产生 - "ai": 2, //applicationId - "ii": 3, //applicationInstanceId - "ss": [ //SpanObject - { - "si": 0, //spanId - "tv": 0, //SpanType - "lv": 2, //SpanLayer - "ps": -1, //parentSpanId - "st": 1501858094726, //startTime - "et": 1501858096804, //endTime - "ci": 3, //componentId - "cn": "", //component - "oi": 0, //operationNameId - "on": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()", //operationName - "pi": 0, //peerId - "pn": "", //peer - "ie": false, //isError - "rs": [ //TraceSegmentReference - { - "pts": [230150, 185809, 24040000], //parentTraceSegmentId, 上级的segment_id 一个应用中的一个实例在链路中产生的编号 - "pii": 2, //parentApplicationInstanceId, 上级的实例编号 - "psp": 1, //parentSpanId, 上级的埋点编号span_id - "psi": 0, //parentServiceId, 上级的服务编号(org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()注册后的ID) - "psn": "/dubbox-case/case/dubbox-rest", //parentServiceName, 上级的服务名 - "ni": 0, //networkAddressId, 上级调用时使用的地址注册后的ID - "nn": "172.25.0.4:20880", //networkAddress, 上级的地址 - "eii": 2, //entryApplicationInstanceId, 入口的实例编号 - "esi": 0, //entryServiceId, 入口的服务编号 - "esn": "/dubbox-case/case/dubbox-rest", //entryServiceName, 入口的服务名词 - "rv": 0 //RefTypeValue, 调用方式(CrossProcess,CrossThread) - } - ], - "to": [ //KeyWithStringValue - { - "k": "url", //key - "v": "rest://172.25.0.4:20880/org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()" //value - }, - { - "k": "http.method", - "v": "GET" - } - ], - "lo": [{ - "ti": 1501858094726, - "ld": [{ - "k": "NullPointException", - "v": "Error Stack" - }] - }] - }, - { - "si": 1, - "tv": 1, - "lv": 1, - "ps": 0, - "st": 1501858094726, - "et": 1501858095804, - "ci": 9, - "cn": "", - "oi": 0, - "on": "mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]", - "pi": 0, - "pn": "localhost:27017", - "ie": false, - "to": [], - "lo": [] - } - ] - } - } -] -``` diff --git a/docs/cn/Use-ShardingJDBC-as-storage-implementor-CN.md b/docs/cn/Use-ShardingJDBC-as-storage-implementor-CN.md deleted file mode 100644 index c6eb15b4cc8c11194b1f67da624cad786766c5ed..0000000000000000000000000000000000000000 --- a/docs/cn/Use-ShardingJDBC-as-storage-implementor-CN.md +++ /dev/null @@ -1,21 +0,0 @@ -# 支持数据库分片存储 -除了默认的Elasticsearch存储外,用户可以用shardingJDBC结合MySQL作为存储实现。 -注意:目前仅支持MYSQL数据库的分片存储,且由于license限制,需要用户手动引入mysql驱动包。 - -## 配置要求 -- 手工导入MYSQL的驱动包mysql-connector-java-5.1.36.jar到collector libs目录下。 -- config/application.yml中,删除Elasticsearch配置,添加shardingjdbc配置如下。 -``` - storage: - shardingjdbc: - driverClass: com.mysql.jdbc.Driver - # JDBC Datasource connections for ShardingJDBC, multiple should be separated by comma - url: jdbc:mysql://ip1:port1/skywalking,jdbc:mysql://ip2:port2/skywalking - # Usernames, which match the sequence of Datasource URLs - userName: admin,admin - # Passwords, which match the sequence of Datasource URLs - password: 123456,123456 -``` - -## 参阅 -- ShardingJDBC从3.x起,现已更名为ShardingSphere,[点这](http://shardingsphere.io) diff --git a/docs/en/OAP/README.md b/docs/en/OAP/README.md index 1a3188773cf3d56f774cc73fd91eb6ec9f80d8a1..290933d9265936f6270169f5d024ddbf41f6c3f8 100644 --- a/docs/en/OAP/README.md +++ b/docs/en/OAP/README.md @@ -1,6 +1,6 @@ # Observability Analysis Platform OAP(Observability Analysis Platform) is a new concept, which starts in SkyWalking 6.x. OAP replaces the -old SkyWalking collectors. The capabilities of the platform are following. +old SkyWalking whole backend. The capabilities of the platform are following. ## OAP capabilities @@ -54,87 +54,101 @@ METRIC_NAME = from(SCOPE.(* | [FIELD][,FIELD ...])) **SCOPE** in (`All`, `Service`, `ServiceInstance`, `Endpoint`, `ServiceRelation`, `ServiceInstanceRelation`, `EndpointRelation`). #### Field -- SCOPE `All`, -1. endpoint. Represent the endpoint path of each request. -1. latency. Represent how much time of each request. -1. status. Represent whether success or fail of the request. -1. responseCode. Represent the response code of HTTP response, if this request is the HTTP call. +By using Aggregation Function, the requests will group by time and **Group Key(s)** in each scope. + +- SCOPE `All` + +| Name | Remarks | Group Key | Type | +|---|---|---|---| +| endpoint | Represent the endpoint path of each request. | | string | +| latency | Represent how much time of each request. | | int(in ms) | +| status | Represent whether success or fail of the request. | | bool(true for success) | +| responseCode | Represent the response code of HTTP response, if this request is the HTTP call. e.g. 200, 404, 302| | int | -All details in `All` scope will group together. - SCOPE `Service` Calculate the metric data from each request of the service. -1. id. Represent the unique id of the service, usually a number. **Group by this in default**. -1. name. Represent the name of the service. -1. serviceInstanceName. Represent the name of the service instance id referred. -1. endpointName. Represent the name of the endpoint, such a full path of HTTP URI. -1. latency. Represent how much time of each request. -1. status. Represent whether success or fail of the request. -1. responseCode. Represent the response code of HTTP response, if this request is the HTTP call. -1. type. Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. + +| Name | Remarks | Group Key | Type | +|---|---|---|---| +| id | Represent the unique id of the service | yes | int | +| name | Represent the name of the service | | string | +| serviceInstanceName | Represent the name of the service instance id referred | | string | +| endpointName | Represent the name of the endpoint, such a full path of HTTP URI | | string | +| latency | Represent how much time of each request. | | int | +| status | Represent whether success or fail of the request. | | bool(true for success) | +| responseCode | Represent the response code of HTTP response, if this request is the HTTP call | | int| +| type | Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum | - SCOPE `ServiceInstance` Calculate the metric data from each request of the service instance. -1. id. Represent the unique id of the service, usually a number. **Group by this in default**. -1. name. Represent the name of the service instance. Such as `ip:port@Service Name`. -**Notice**: current native agent uses `processId@Service name` as instance name, which is useless -when you want to setup a filter in aggregation. -1. serviceName. Represent the name of the service. -1. endpointName. Represent the name of the endpoint, such a full path of HTTP URI. -1. latency. Represent how much time of each request. -1. status. Represent whether success or fail of the request. -1. responseCode. Represent the response code of HTTP response, if this request is the HTTP call. -1. type. Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. + +| Name | Remarks | Group Key | Type | +|---|---|---|---| +| id | Represent the unique id of the service, usually a number. | yes | int | +| name | Represent the name of the service instance. Such as `ip:port@Service Name`. **Notice**: current native agent uses `processId@Service name` as instance name, which is useless when you want to setup a filter in aggregation. | | string| +| serviceName | Represent the name of the service. | | string | +| endpointName | Represent the name of the endpoint, such a full path of HTTP URI. | | string| +| latency | Represent how much time of each request. | | int | +| status | Represent whether success or fail of the request. | | bool(true for success) | +| responseCode | Represent the response code of HTTP response, if this request is the HTTP call. | | int | +| type | Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum | - SCOPE `Endpoint` Calculate the metric data from each request of the endpoint in the service. -1. id. Represent the unique id of the endpoint, usually a number. **Group by this in default**. -1. name. Represent the name of the endpoint, such a full path of HTTP URI. -1. serviceName. Represent the name of the service. -1. serviceInstanceName. Represent the name of the service instance id referred. -1. latency. Represent how much time of each request. -1. status. Represent whether success or fail of the request. -1. responseCode. Represent the response code of HTTP response, if this request is the HTTP call. -1. type. Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. + +| Name | Remarks | Group Key | Type | +|---|---|---|---| +| id | Represent the unique id of the endpoint, usually a number. | yes | int | +| name | Represent the name of the endpoint, such a full path of HTTP URI. | | string | +| serviceName | Represent the name of the service. | | string | +| serviceInstanceName | Represent the name of the service instance id referred. | | string | +| latency | Represent how much time of each request. | | int | +| status | Represent whether success or fail of the request.| | bool(true for success) | +| responseCode | Represent the response code of HTTP response, if this request is the HTTP call. | | int | +| type | Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum | - SCOPE `ServiceRelation` Calculate the metric data from each request between one service and the other service -1. sourceServiceId. Represent the id of the source service. -1. sourceServiceName. Represent the name of the source service. -1. sourceServiceInstanceName. Represent the name of the source service instance. -1. destServiceId. Represent the id of the destination service. -1. destServiceName. Represent the name of the destination service. -1. destServiceInstanceName. Represent the name of the destination service instance. -1. endpoint. Represent the endpoint used in this call. -1. latency. Represent how much time of each request. -1. status. Represent whether success or fail of the request. -1. responseCode. Represent the response code of HTTP response, if this request is the HTTP call. -1. type. Represent the type of the remote call. Such as: Database, HTTP, RPC, gRPC. -1. detectPoint. Represent where is the relation detected. Values: client, server, proxy. - -Group by `sourceServiceId`, `destServiceId` and `detectPoint`. + +| Name | Remarks | Group Key | Type | +|---|---|---|---| +| sourceServiceId | Represent the id of the source service. | yes | int | +| sourceServiceName | Represent the name of the source service. | | string | +| sourceServiceInstanceName | Represent the name of the source service instance. | | string | +| destServiceId | Represent the id of the destination service. | yes | string | +| destServiceName | Represent the name of the destination service. | | string | +| destServiceInstanceName | Represent the name of the destination service instance.| | string| +| endpoint | Represent the endpoint used in this call. | | string +| latency | Represent how much time of each request. | | int | +| status | Represent whether success or fail of the request.| | bool(true for success) | +| responseCode | Represent the response code of HTTP response, if this request is the HTTP call. | | int | +| type | Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum | +| detectPoint | Represent where is the relation detected. Values: client, server, proxy. | yes | enum| + - SCOPE `ServiceInstanceRelation` Calculate the metric data from each request between one service instance and the other service instance -1. sourceServiceName. Represent the name of the source service. -1. sourceServiceInstanceId. Represent the id of the source service instance. -1. sourceServiceInstanceName. Represent the name of the source service instance. -1. destServiceName. Represent the name of the destination service. -1. destServiceInstanceId. Represent the id of the destination service instance. -1. destServiceInstanceName. Represent the name of the destination service instance. -1. endpoint. Represent the endpoint used in this call. -1. latency. Represent how much time of each request. -1. status. Represent whether success or fail of the request. -1. responseCode. Represent the response code of HTTP response, if this request is the HTTP call. -1. type. Represent the type of the remote call. Such as: Database, HTTP, RPC, gRPC. -1. detectPoint. Represent where is the relation detected. Values: client, server, proxy. - -Group by `sourceServiceInstanceId`, `destServiceInstanceId` and `detectPoint`. + +| Name | Remarks | Group Key | Type | +|---|---|---|---| +| sourceServiceInstanceId | Represent the id of the source service instance. | yes | int| +| sourceServiceName | Represent the name of the source service. | | string | +| sourceServiceInstanceName | Represent the name of the source service instance. | | string | +| destServiceName | Represent the name of the destination service. | | | +| destServiceInstanceId | Represent the id of the destination service instance. | yes | int| +| destServiceInstanceName | Represent the name of the destination service instance. | | string | +| endpoint | Represent the endpoint used in this call. | | string +| latency | Represent how much time of each request. | | int | +| status | Represent whether success or fail of the request.| | bool(true for success) | +| responseCode | Represent the response code of HTTP response, if this request is the HTTP call. | | int | +| type | Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum | +| detectPoint | Represent where is the relation detected. Values: client, server, proxy. | yes | enum| - SCOPE `EndpointRelation` @@ -143,18 +157,17 @@ This relation is hard to detect, also depends on tracing lib to propagate the pr So `EndpointRelation` scope aggregation effects only in service under tracing by SkyWalking native agents, including auto instrument agents(like Java, .NET), OpenCensus SkyWalking exporter implementation or others propagate tracing context in SkyWalking spec. -1. endpointId. Represent the id of the endpoint as parent in the dependency. -1. endpoint. Represent the endpoint as parent in the dependency. -1. childEndpointId. Represent the id of the endpoint being used by the parent endpoint in (1) -1. childEndpoint. Represent the endpoint being used by the parent endpoint in (2) -1. rpcLatency. Represent the latency of the RPC from some codes in the endpoint to the childEndpoint. Exclude the latency caused by the endpoint(1) itself. -1. status. Represent whether success or fail of the request. -1. responseCode. Represent the response code of HTTP response, if this request is the HTTP call. -1. type. Represent the type of the remote call. Such as: Database, HTTP, RPC, gRPC. -1. detectPoint. Represent where is the relation detected. Values: client, server, proxy. - -Group by `endpointId`, `childEndpointId` and `detectPoint`. - +| Name | Remarks | Group Key | Type | +|---|---|---|---| +| endpointId | Represent the id of the endpoint as parent in the dependency. | yes | int | +| endpoint | Represent the endpoint as parent in the dependency.| | string| +| childEndpointId | Represent the id of the endpoint being used by the parent endpoint in row(1) | yes | int| +| childEndpoint| Represent the endpoint being used by the parent endpoint in row(2) | | string | +| rpcLatency | Represent the latency of the RPC from some codes in the endpoint to the childEndpoint. Exclude the latency caused by the endpoint(1) itself. +| status | Represent whether success or fail of the request.| | bool(true for success) | +| responseCode | Represent the response code of HTTP response, if this request is the HTTP call. | | int | +| type | Represent the type of each request. Such as: Database, HTTP, RPC, gRPC. | | enum | +| detectPoint | Represent where is the relation detected. Values: client, server, proxy. | yes | enum| #### Filter Use filter to build the conditions for the value of fields, by using field name and expression. @@ -164,9 +177,13 @@ The default functions are provided by SkyWalking OAP core, and could implement m Provided functions - `avg` +- `p99` +- `p90` +- `p75` +- `p50` - `percent` -- `sum` - `histogram` +- `sum` #### Metric name The metric name for storage implementor, alarm and query modules. The type inference supported by core.