声明,本编博客,只是为了记录

架构

流程走向

┌─────────────┐ ┌───────────────────────┐ ┌─────────────┐ ┌──────────────────┐

│ User Code │ │ Trace Instrumentation │ │ Http Client │ │ Zipkin Collector │

└─────────────┘ └───────────────────────┘ └─────────────┘ └──────────────────┘

│ │ │ │

┌─────────┐

│ ──┤GET /foo ├─▶ │ ────┐ │ │

└─────────┘ │ record tags

│ │ ◀───┘ │ │

────┐

│ │ │ add trace headers │ │

◀───┘

│ │ ────┐ │ │

│ record timestamp

│ │ ◀───┘ │ │

┌─────────────────┐

│ │ ──┤GET /foo ├─▶ │ │

│X-B3-TraceId: aa │ ────┐

│ │ │X-B3-SpanId: 6b │ │ │ │

└─────────────────┘ │ invoke

│ │ │ │ request │

│ │ │ │ │

┌────────┐ ◀───┘

│ │ ◀─────┤200 OK ├─────── │ │

────┐ └────────┘

│ │ │ record duration │ │

┌────────┐ ◀───┘

│ ◀──┤200 OK ├── │ │ │

└────────┘ ┌────────────────────────────────┐

│ │ ──┤ asynchronously report span ├────▶ │

│ │

│{ │

│ "traceId": "aa", │

│ "id": "6b", │

│ "name": "get", │

│ "timestamp": 1483945573944000,│

│ "duration": 386000, │

│ "annotations": [ │

│--snip-- │

└────────────────────────────────┘

组件

collector—从收集数据

storage–存储

search–搜索组建

web UI–UI页面

Instrumenting–负责收集数据,更多信息请参考existing_instrumentations

[root@i-vzdytl5t ~]# docker run -d -p 9411:9411 openzipkin/zipkin

Unable to find image 'openzipkin/zipkin:latest' locally

Trying to pull repository docker.io/openzipkin/zipkin ...

latest: Pulling from docker.io/openzipkin/zipkin

ff3a5c916c92: Already exists

a8906544047d: Already exists

590b87a38029: Pull complete

5a45314016bd: Pull complete

596d597fd76a: Pull complete

0ca7f3c515ee: Pull complete

Digest: sha256:54d39fa30f23c1f27ccc64e62ad14e73237bdddb215d6935a1b2528e32242260

Status: Downloaded newer image for docker.io/openzipkin/zipkin:latest

307bd7e7843fca7410fbd1282f4fad1520284483759b6735dff096b071038c78

[root@i-vzdytl5t ~]# docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

307bd7e7843f openzipkin/zipkin "/bin/bash -c 'tes..." 27 minutes ago Up 27 minutes 9410/tcp, 0.0.0.0:9411->9411/tcp festive_chandrasekhar

访问http://your_host:9411

安装成功,另外还支持二进制部署以及自己编译

二进制部署

curl -sSL https://zipkin.io/quickstart.sh | bash -s

java -jar zipkin.jar

自己编译

# get the latest source

git clone https://github.com/openzipkin/zipkin

cd zipkin

# Build the server and also make its dependencies

./mvnw -DskipTests --also-make -pl zipkin-server clean install

# Run the server

java -jar ./zipkin-server/target/zipkin-server-*exec.jar

如果用docker-compose 部署的话,里面也用到了prometheus的服务,内容如下

version: '2'

services:

storage:

image: openzipkin/zipkin-mysql

container_name: mysql

# Uncomment to expose the storage port for testing

# ports:

# - 3306:3306

# The zipkin process services the UI, and also exposes a POST endpoint that

# instrumentation can send trace data to. Scribe is disabled by default.

zipkin:

image: openzipkin/zipkin

container_name: zipkin

# Environment settings are defined here https://github.com/openzipkin/zipkin/tree/1.19.0/zipkin-server#environment-variables

environment:

- STORAGE_TYPE=mysql

# Point the zipkin at the storage backend

- MYSQL_HOST=mysql

# Uncomment to enable scribe

# - SCRIBE_ENABLED=true

# Uncomment to enable self-tracing

# - SELF_TRACING_ENABLED=true

# Uncomment to enable debug logging

# - JAVA_OPTS=-Dlogging.level.zipkin=DEBUG -Dlogging.level.zipkin2=DEBUG

ports:

# Port used for the Zipkin UI and HTTP Api

- 9411:9411

# Uncomment if you set SCRIBE_ENABLED=true

# - 9410:9410

depends_on:

- storage

# Adds a cron to process spans since midnight every hour, and all spans each day

# This data is served by http://192.168.99.100:8080/dependency

#

# For more details, see https://github.com/openzipkin/docker-zipkin-dependencies

dependencies:

image: openzipkin/zipkin-dependencies

container_name: dependencies

entrypoint: crond -f

environment:

- STORAGE_TYPE=mysql

- MYSQL_HOST=mysql

# Add the baked-in username and password for the zipkin-mysql image

- MYSQL_USER=zipkin

- MYSQL_PASS=zipkin

# Uncomment to see dependency processing logs

# - ZIPKIN_LOG_LEVEL=DEBUG

# Uncomment to adjust memory used by the dependencies job

# - JAVA_OPTS=-verbose:gc -Xms1G -Xmx1G

depends_on:

- storage

prometheus:

image: prom/prometheus

container_name: prometheus

ports:

- 9090:9090

depends_on:

- storage

volumes:

- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml

grafana:

image: grafana/grafana

container_name: grafana

ports:

- 3000:3000

depends_on:

- prometheus

environment:

- GF_AUTH_ANONYMOUS_ENABLED=true

- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin

setup_grafana_datasource:

image: appropriate/curl

container_name: setup_grafana_datasource

depends_on:

- grafana

volumes:

- ./prometheus/create-datasource-and-dashboard.sh:/create.sh:ro

command: /create.sh

需要在节点上部署对应语言的

比如golang的,就可以参考example_httpserver_test

C#

Go

Java

JavaScript

Ruby

Scala

apm php zipkin,开源apm zipkin工具简单使用-Go语言中文社区相关推荐

  1. motan yar php,motan学习笔记 六 opentracing Brave+zipkin实现-Go语言中文社区

    前面我们学习了,opentracing的接口定义 本文来学习motan用filter 来拦截请求,并用brace来实现,上报数据到zipkin zipkin是什么 本文主要讲brace 如何实现ope ...

  2. android 开源图表动画,Android 图表开发开源库MPAndroidChart-Go语言中文社区

    上面是APP中实现的效果图(点击可以放大查看) 图1的效果不是用这个实现的,如果感兴趣可以参考我这篇文章  Android渐变圆环 总体来说,MPAndroidChart可能是目前Android 开发 ...

  3. 基于python爬虫的论文标题_python爬虫——简单论文标题检索-Go语言中文社区

    有趣的爬虫,独有的意义召唤着我去学习,去尝试.最近有感于每天对于论文的收集,感觉自己的收集速度赶不上论文的更新速度,同时对于自己想找到的论文的收集比较麻烦.因此,学习用python写一个很简单的爬虫, ...

  4. go语言能编android程序吗,用 Golang 开发 Android 应用(二)—— 简单 UI-Go语言中文社区...

    计划按以下的内容更新 简单 UI 关于开发一个应用,要有自己的应用名(显示用),和包名(真正唯一的应用名),简单说一台 Android 手机中所有应用的包名是唯一的,如果新安装的应用包名和已安装的应用 ...

  5. go 捕获网卡http_接口测试工具Postman(三)使用postman抓包捕获HTTP请求-Go语言中文社区...

    一.捕获HTTP请求 Postman提供了轻松查看和捕获应用程序中发送和接收的实际HTTP请求流量的工具, 可以在Postman本机应用程序中使用内置代理进行抓包. 1.postman内置代理 pos ...

  6. node如何输出html页面,【自己的整理】node.js直接输出一个非常简单的HTML页面-Go语言中文社区...

    刚开始接触nodejs,先记录一下最开始用node输出一个很简单的界面 在远程服务器上先创建一个js文件 helloworld.js [root@towrabbit nodejsLearn]# vi ...

  7. linux连接wpa wifi密码,Linux环境下使用WIFI模块:使用wpa_supplicant工具配置和连接WIFI-Go语言中文社区...

    使用wpa_supplicant工具配置和连接WIFI 实验版本及下载地址 wpa_supplicant:wpa_supplicant-2.7 链接: [http://w1.fi/wpa_suppli ...

  8. java采用匈牙利命名法_【Java】工具类,如何将匈牙利命名法转换成驼峰命名法-Go语言中文社区...

    一.概念介绍 1.1.匈牙利命名法:user_id,字母均小写,不同单词间用下划线分割: 1.2.驼峰命名法:userId,除了第一个单词的首字母小写,其余单词的首字母均大写,单词之间没有符号,仅仅通 ...

  9. java 航班_Java实现简单航班查询系统-Go语言中文社区

    #java实现简单航班管理系统 题目要求:声明一个Flight(航班)类,该类包含private域航班号(如:CA1430),起飞时间(如:10:15AM),到达时间(如:2:30PM).为该类声明合 ...

最新文章

  1. js页面跳转或重定向
  2. Linux下关闭和开启IPv6的方法
  3. java文件下载文件名乱码
  4. golang 不定参 可变参 使用 传递
  5. 【Python】format()中槽的嵌套以及range()函数用法
  6. zookeeper 都有哪些使用场景?
  7. 28家知名IT公司名称的由来
  8. android cordova 教程,cordova入门教程(一)
  9. 2017.10.26 星际贸易 思考记录
  10. ExecuteNonQuery()的返回值
  11. 【quick-cocos2d-lua】 疯狂牛牛
  12. spark编程ERROR01——java.lang.NullPointerException
  13. 《决胜B端》读书笔记04:互联网领域常见产品方向、盈利模式、盈利模式对产品方向的诉求
  14. 图论科学家教你如何安排婚礼座次
  15. 2022年高新技术企业认定的补贴有多少?
  16. Lync 2010升级到2013之部署企业语音!
  17. 11. 形态学膨胀、腐蚀、开运算、闭运算
  18. Python中类函数中self是什么
  19. C#-linq实战003-查询-Where
  20. opencv读取视频及打不开视频的解决方法

热门文章

  1. 二、使用krypton库完成winfrom UI设计,并配置Teigha.get的运行环境
  2. 写给18岁以后的成年人
  3. Python兼职私活接单方法大曝光,这5种方法你知道吗?
  4. 常见词汇背后的故事(1)
  5. SAP FICO 应付暂估账龄表【报表界面展示、程序代码仅作参考,不保证一定可以运行】
  6. Unity国际版forM1Mac
  7. 怎么在CAD编辑软件中设置文字样式
  8. 从零开始学Redis之金刚凡境
  9. 南京航天航空航天大学计算机学院,南京航空航天大学计算机学院2018招收推免生办法...
  10. CentOS 7 停止并禁用avahi-daemon服务