微服务集成SkyWalking

本文介绍了如何将SkyWalking集成到Spring Cloud Alibaba项目中,包括SkyWalking的架构组成,详细步骤演示了如何使用官方docker镜像部署,自建镜像,以及客户端Agent的配置方法。
摘要由CSDN通过智能技术生成

title: 微服务集成SkyWalking
date: 2019-11-24 09:59:21
categories:

  • 微服务
    tags:
  • SkyWalking

最近做的一个项目使用了Spring Cloud Alibaba,随着服务系统的增多,调用连也越来越复杂,好几天不碰,就有点忘了,所以想集成一个APM系统进来,没想到遇到很多坑,边学习边记录,最开始学习netflix那一套的时候,玩过zipkin,觉得界面有点丑。。。想到SkyWalking是国人写的,文档多点,就尝试了下。

架构

SkyWalking的架构图就不偷了,它主要分成4大模块,这些模块也是我们需要安装的。

  • Agent(客户端收集器):使用 JavaAgent 做字节码植入,无侵入式的收集,并通过 HTTP 或者 gRPC 方式发送数据到 SkyWalking Collector。
  • Oap(服务端分析):链路数据收集器,对 agent 传过来的数据进行整合分析处理并落入相关的数据存储中。
  • Storage(存储): SkyWalking 的存储,Mysql、ES、H2存储介质进行数据存储。
  • UI:Web 可视化平台,用来展示落地的数据。
安装
使用官方的docker镜像部署,docker-compose文件
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: '3.3'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.4.3
    container_name: elasticsearch
    restart: always
    ports:
      - 9201:9200
      - 9301:9300
    environment:
      discovery.type: single-node
      TZ: Asia/Shanghai
    ulimits:
      memlock:
        soft: -1
        hard: -1
  oap:
    image: apache/skywalking-oap-server
    container_name: oap
    depends_on:
      - elasticsearch
    links:
      - elasticsearch
    restart: always
    ports:
      - 11800:11800
      - 12800:12800
    environment:
      SW_STORAGE: elasticsearch
      SW_STORAGE_ES_CLUSTER_NODES: 10.0.12.4:9201
      TZ: Asia/Shanghai
  ui:
    image: apache/skywalking-ui
    container_name: ui
    depends_on:
      - oap
    links:
      - oap
    restart: always
    ports:
      - 8480:8080
    environment:
      SW_OAP_ADRESS: 11.0.12.4:12800
      TZ: Asia/Shangha
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值