123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- option java_package = "com.nrxt.nms.rpc.protobuf";
- option java_outer_classname = "TraceMessage";
- package nrxt;
- //标签信息
- message Tag {
- required string key = 1; //标签key
- required string value = 2; //标签value
- }
- //事件
- message Event {
- required string level = 1; //等级
- required string message = 2; //事件内容
- required string name = 3; //事件名称
- optional string stack = 4; //异常堆栈
- }
- message NetMetric {
- required string metricCode = 1; // 指标编码
- required bool success = 2 [default = true]; // 是否成功
- optional string errorCode = 3; // 错误代码
- optional string errorMsg = 4; // 错误信息
- optional string metricValue = 5; // 采集结果
- }
- message NPMSpan {
- required string traceId = 1 ;
- required string fromIp = 2 ;
- optional string fromPort = 3 ;
- required string toIp = 4 ;
- required string toPort = 5 ;
- required string referUrl = 6 ;
- required string url = 7 ;
- required string cmdbId = 8 ;
- required string apmServiceCode = 9 ;
- optional string apmServiceInstId = 10;
- required string uri = 11;
- required int64 startTime = 12;
- required int64 endTime = 13;
- required bool success = 14;
- required string statusCode = 15;
- optional string errorMsg = 16;
- repeated NetMetric netMetric = 17;// 网络指标
- repeated Tag tag = 18;
- }
- message APMSpan {
- enum SpanTypeCls {
- ENTRY = 1; //进入
- LOCAL = 2; //本地
- EXIT = 3; //调用外部
- }
- enum LayerCls {
- JOB = 1; //任务触发
- METHOD = 2; //本地方法
- DB = 3; //数据库驱动层
- RPC = 4; //RPC框架层
- HTTP = 5; //HTTP框架层
- MQ = 6; //MQ驱动层
- CACHE = 7; //CACHE驱动层
- }
- required string traceId = 1 ;
- required string segmentId = 2 ;
- required string spanId = 3 ;
- optional string superSegmentId = 4 ;
- optional string superSpanId = 5 ;
- optional string apmServiceCode = 6 ;
- optional string apmServiceInstId = 7 ;
- optional string cmdbId = 8 ;
- optional string superAPMServiceCode =9 ;
- optional string superAPMServiceInstId =10;
- optional string superAPMEndpointName = 11;
- optional string superCmdbId =12;
- required string apmEndpointName = 13;
- required int64 startTime = 14;
- required int64 endTime = 15;
- required SpanTypeCls type = 16;
- required LayerCls layer = 17;
- required bool success = 18;
- required string statusCode = 19;
- optional string errorMsg = 20;
- optional Event event = 21;
- optional string peer = 22;
- repeated Tag tag = 23;
- repeated APMSpan subSpan = 24;
- }
-
- message UserRequest {
- enum ClientType {
- web = 1; //桌面浏览器
- app = 2; //移动app
- }
- required string traceId = 1;
- required string uerId = 2;
- required string clientIp = 3;
- required ClientType clientType = 4;
- required string appName = 5;
- required string cmdbId = 6;
- required string requestUrl = 7;
- required string referUrl = 8;
- required int64 startTime = 9;
- required int64 endTime = 10;
- required bool success = 11;
- required int32 statusCode = 12;
- optional string errorMsg = 13;
- }
- message SpanMessage {
- enum MsgType {
- user = 1; //表示消息内容是用户客户端请求
- npm = 2; //表示消息内容是npmspan
- apm = 3; //表示消息内容是apmspan
- }
- optional UserRequest userRequest =1;
- optional NPMSpan npmSpan =2;
- optional APMSpan apmSpan =3;
- required MsgType msgType =4;
- optional string secZoneId =5 [default = "40003102"];
- }
|