Spring Cloud Edgware之后版本 Zipkin+Kafka整合
zipkin服务器端
1、依赖
<!-- zipkin server -->
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-ui</artifactId>
</dependency>
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-server</artifactId>
</dependency>
<!-- kafka -->
<dependency>
<groupId>io.zipkin.java</groupId>
<artifactId>zipkin-autoconfigure-collector-kafka</artifactId>
<version>2.4.1</version>
</dependency>
2、启动类上添加@EnableZipkinServer
3、配置文件
#存储类型,缺失配置项的时候默认使用内存
zipkin.storage.type=mem
zipkin.collector.kafka.bootstrap-servers=10.1.8.2:9192
zipkin.collector.kafka.zookeeper=10.1.8.2:2282/kafka210dev
#kafka主题,不配置时默认使用zipkin
zipkin.collector.kafka.topic=zipkin
微服务端
1、依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zipkin</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
2、配置
#配置zipkin发送类型为kafka
spring.zipkin.sender.type=kafka
spring.kafka.bootstrap-servers=10.1.8.2:9192
#kafka主题,不配置时默认使用zipkin
spring.zipkin.kafka.topic=zipkin
#设置服务名,不设置默认使用spring.application.name
spring.zipkin.service.name=gateway
#采样率设置
spring.sleuth.sampler.percentage=1.0
创建Kafka主题
进入kafka的bin目录,创建zipkin主题。
kafka-topics.sh --create --zookeeper 10.1.8.2:2282/kafka210dev --replication-factor 1 --partitions 1 --topic zipkin
监视kafka中的数据
kafka-console-consumer.sh --bootstrap-server 10.1.8.2:9192 --topic zipkin
参考周立大神博文:http://www.itmuch.com/spring-cloud/edgware-new-sleuth-zipkin-mq/
Spring Cloud Edgware之后版本 Zipkin+Kafka整合的更多相关文章
- spring cloud:Edgware.RELEASE版本hystrix超时新坑
升级到Edgware.RELEASE发现,zuul中不管如何设置hystrix的超时时间均不起作用,仍然是默认的1000ms. 降回低版本后正常,但是低版本的fallback方法中,又拿不到详细异常 ...
- spring cloud:Edgware.RELEASE版本中zuul回退方法的变化
Edgware.RELEASE以前的版本中,zuul网关中有一个ZuulFallbackProvider接口,代码如下: public interface ZuulFallbackProvider { ...
- spring cloud 2.x版本 Sleuth+Zipkin分布式链路追踪
前言 本文采用Spring cloud本文为2.1.8RELEASE,version=Greenwich.SR3 本文基于前两篇文章eureka-server.eureka-client.eureka ...
- spring cloud 2.x版本 Spring Cloud Stream消息驱动组件基础教程(kafaka篇)
本文采用Spring cloud本文为2.1.8RELEASE,version=Greenwich.SR3 本文基于前两篇文章eureka-server.eureka-client.eureka-ri ...
- Spring Cloud简介以及版本选择
什么是SpringCloud 官方的说法就是spring Cloud 给开发者提供一套按照一定套路快速开发 分布式系统 的工具. 具体点就是Spring boot实现的微服务架构开发工具.它为微服务架 ...
- 史上最简单的SpringCloud教程 | 第九篇: 服务链路追踪(Spring Cloud Sleuth)(Finchley版本)
转载请标明出处: 原文首发于:>https://www.fangzhipeng.com/springcloud/2018/08/30/sc-f9-sleuth/ 本文出自方志朋的博客 这篇文章主 ...
- spring cloud 2.x版本 Gateway路由网关教程
前言 本文采用Spring cloud本文为2.1.8RELEASE,version=Greenwich.SR3 本文基于前两篇文章eureka-server.eureka-client.eureka ...
- Spring Cloud Edgware Release Notes
Spring Cloud Edgware builds on Spring Boot 1.5.x. Renamed starters A number of starters did not foll ...
- spring cloud 2.x版本 Ribbon服务发现教程(内含集成Hystrix熔断机制)
本文采用Spring cloud本文为2.1.8RELEASE,version=Greenwich.SR3 前言 本文基于前两篇文章eureka-server和eureka-client的实现. 参考 ...
随机推荐
- P2158/bzoj2190 [SDOI2008]仪仗队
P2158 [SDOI2008]仪仗队 欧拉函数 计算下三角的点数再*2+1 观察斜率,自行体会 #include<iostream> #include<cstdio> #in ...
- Linux LNMP架构搭建
一.搭建LNMP基本架构 1.L(http) N(nginx) M(mysql) P(php) 2.安装顺序 Mysql-->PHP-->Nginx 3.安装包 Discuz_3. htt ...
- 05: MySQLdb 原生SQL语句操作数据库
1.1 MySQLdb安装与简介 1.MySQLdb 模块的安装(python3中目前这个模块还不可用)参考博客 1. linux: yum install MySQL-python 2. windo ...
- linux内核分析 第18章读书笔记
十八章 调试 一.内核调试概述 1.需要面对的 一个确定的bug 一个藏匿bug的内核版本 相关的内核代码的知识和运气 2.艰难的调试工作 重现bug很困难:大部分bug通常都不是行为可靠而且定义明确 ...
- .Family_物联网
群名称 : .Family_物联网 QQ群号: 群介绍 基于嵌入式,构建各通信模式,网关,平台软件,工业系统等领域,欢迎各位朋友加群,交流学习!
- Win32 API编程:使用CreateProcess创建新进程
#include <windows.h> #include <tchar.h> #include <stdio.h> int main(int argc, char ...
- cogs 330. [NOI2003] 文本编辑器
★★★ 输入文件:editor2003.in 输出文件:editor2003.out 简单对比 时间限制:2 s 内存限制:128 MB [问题描述] 很久很久以前,DOS3.x的程序 ...
- 高通RFC适配RFFE-添加MIPI设备【转】
本文转载自:https://blog.csdn.net/u011212816/article/details/80828625 RF driver主要设计到的器件 1.Transceiver 2.RF ...
- NS3 使用NS3工具PyViz
官方文档 跑了一个样例(first.py): 由于 NetAnim 对我实在是有点不友好,在 PyViz 和 NetAnim 之间,我倾向前者.后者需要生成.xml文件,相比前者较为麻烦. 安装过程: ...
- LINUX设备驱动模型之class
转自 https://blog.csdn.net/qq_20678703/article/details/52754661 1.LINUX设备驱动模型中的bus.device.driver,.其中bu ...