基于pinpoint改造的一种方式的思考(3)--javascript/golang agent处理
2017-10-05 20:17
295 查看
前言
在前一篇文章中,我们探讨了collector 的数据处理,这一篇中我们将讲讲如何构建javascript、golang agent。golang
如图所示我们将pinpoint的协议进行改造,并生成go语言版本的agent
type TSpan struct { AgentId string `thrift:"agentId,1" json:"agentId"` ApplicationName string `thrift:"applicationName,2" json:"applicationName"` AgentStartTime int64 `thrift:"agentStartTime,3" json:"agentStartTime"` TransactionId []byte `thrift:"transactionId,4" json:"transactionId"` // unused fields # 5 to 6 SpanId int64 `thrift:"spanId,7" json:"spanId"` ParentSpanId int64 `thrift:"parentSpanId,8" json:"parentSpanId"` StartTime int64 `thrift:"startTime,9" json:"startTime"` Elapsed int32 `thrift:"elapsed,10" json:"elapsed"` Rpc *string `thrift:"rpc,11" json:"rpc"` ServiceType int16 `thrift:"serviceType,12" json:"serviceType"` EndPoint *string `thrift:"endPoint,13" json:"endPoint"` RemoteAddr *string `thrift:"remoteAddr,14" json:"remoteAddr"` Annotations []*TAnnotation `thrift:"annotations,15" json:"annotations"` Flag int16 `thrift:"flag,16" json:"flag"` Err *int32 `thrift:"err,17" json:"err"` SpanEventList []*TSpanEvent `thrift:"spanEventList,18" json:"spanEventList"` ParentApplicationName *string `thrift:"parentApplicationName,19" json:"parentApplicationName"` ParentApplicationType *int16 `thrift:"parentApplicationType,20" json:"parentApplicationType"` AcceptorHost *string `thrift:"acceptorHost,21" json:"acceptorHost"` // unused fields # 22 to 24 ApiId *int32 `thrift:"apiId,25" json:"apiId"` ExceptionInfo *TIntStringValue `thrift:"exceptionInfo,26" json:"exceptionInfo"` // unused fields # 27 to 29 ApplicationServiceType *int16 `thrift:"applicationServiceType,30" json:"applicationServiceType"` LoggingTransactionInfo *int8 `thrift:"loggingTransactionInfo,31" json:"loggingTransactionInfo"` }
我们将Agent发送的数据发送到mecury,mecury再次进行数据解析,数据压缩,发送到collector。
javascript
javascript 我们将新增 GetWay网关层。我们见agent数据提供websocket发送到高性能GetWay层。GetWay将网页的监控数据链路数据错误信息,进行预处理,压缩发送到collector。自此将全链路数据打通,同时也收集了前端的性能数据。
总结
javascript/golang agent改造到此结束。不过后续还有很多问题需要处理:1.如何处理离线数据,并能在web端实时高效的展示。 2.如何结合全链路监控和系统监控,做业务监控,服务监控
相关文章推荐
- 基于pinpoint改造的一种方式的思考(1)--agent 添加代理层
- 基于pinpoint改造的一种方式的思考(2)--collector 的数据处理
- stax(和dom4j功能一样,这个是基于流的一种处理方式)
- 一种基于云计算方式的任务处理模型
- pinpoint Agent-启动加载插件分析
- javascript事件小结(事件处理程序方式)--javascript高级程序设计笔记
- 延云YDB基于spark进行数据分析的一种新方式
- 异类的Javascript处理和解析URL的方式
- hibernate中对联合主键数据保存的一种处理方式
- Android RadioGroup中的RadioButton无法选中问题的一种处理方式
- 基于HTML标签的JavaScript触发事件处理
- 一种基于中值滤波的轨迹纠偏方法和几点思考
- Url请求长度HTTP协议不对URI的长度作事先的限制,服务器必须能够处理任何他们提供资源的URI,并且应该能够处理无限长度的URIs,这种无效长度的URL可能会在客户端以基于GET方式的请求时产生。
- python中一种完全可能情况带入计算的处理方式
- 【经验记录】pinpoint-web显示不了agent的信息
- 基于JavaScript实现继承机制之构造函数+原型链混合方式的使用详解
- [H5-Compress-Image]利用canvas实现 javascript 图片压缩处理_基于requirejs模块化的代码实现
- 将本地文件读成sequenceFile文件,处理海量小文件的一种方式
- 基于MVC4+EasyUI的Web开发框架经验总结(12)--利用Jquery处理数据交互的几种方式
- 思考一种高性能的服务器处理框架