服务端探针配置

配置属性   类型 描述 示列数据
Enable bool 是否启用探针,默认:true true
ProductCode string 天眼平台产品编码 fast
AppCode string 天眼平台应用编码 analysis
AppKey string 天眼平台应用Key xxxxxxxxxxxxx,用于获取STS
TenantCode string 租户编码(常量),TenantCode与TenantCodeReader二者选其一。若已配置TenantCode,则TenantCodeReader不生效 XXX租户
TenantCodeReader array<object> 租户编码获取 [{"ReaderType": "QueryString", "ReaderKey": "tenant"}] ,参考:CodeReader
UserCodeReader array<object> 用户编码获取 [{"ReaderType": "Cookie", "ReaderKey": "keeplastname"}] ,参考:CodeReader
Logging.Level string 探针日志记录级别 Verbose、Debug、Information、Warning、Error、Fatal
Logging.FilePath string 探针日志文件存储路径 logs/fast-tracker/{Date}.log
CarrierHeader.TrackerName string 链路间HTTP调用穿透链路的请求头名称 fast-tracker
CarrierHeader.TraceIdName string 用于前端穿透链路的请求头名称(TraceID) x-log-id
Event.Components array<string> 收集相关软件包,框架,类库或模块的事件 [ "SqlClient", "HttpClient", "CustomEvent" ]
Event.CustomEventSourceName string 自定义事件源名称 FAST-Tracker-Custom-Event
Event.IgnoreEntryPaths array<string> 忽略入口请求(虚拟路径) [ "/api/values","/api/*","*/values" ]
Event.IgnoreEntryFiles array<string> 忽略入口文件请求 [ ".ico", ".js", ".css", ".woff", ".woff2", ".svg", ".ttf", ".jpg", ".jpeg", ".png", ".gif", ".bmp" ]
Event.IgnoreNullReference bool 忽略无引用关系的Span true
Sampling.SamplePer3Secs int 每三秒采样数量(默认为:-1,关闭该采样) 100:每三秒采集100条Trace
Sampling.Percentage double 按百分比采样(默认为:-1,关闭该采样) 60:采集60%的Trace
Transport.TokenServerEndpoint string 获取服务端上报日志STS https://fast-tools.mypaas.com.cn/api/sts/serverlog
Transport.QueueSize int 日志缓存队列大小 1572864
Transport.BatchSize int 批次上报日志条数 3072
Transport.Interval int 数据上报时间间隔(单位:ms) 3000

FastTracker.json 模板

{
  "FastTracker": {
    "ProductCode": "天眼平台产品编码",
    "AppCode": "天眼平台应用编码",
    "AppKey": "天眼平台应用Key",
    "TenantCode": "租户编码",
    "UserCodeReader": [
      {
        "ReaderType": "Cookie",
        "ReaderKey": "keeplastname"
      }
    ],
    "Logging": {
      "Level": "Information",
      "FilePath": "logs/fast-tracker/{Date}.log"
    },
    "CarrierHeader": {
      "TrackerName": "fast-tracker",
      "TraceIdName": "x-log-id"
    },
    "Event": {
      "Components": [ "SqlClient", "HttpClient", "CustomEvent" ],
      "CustomeEventSourceName": "FAST-Tracker-Custome-Event",
      "IgnoreEntryPaths": [ "/api/values" ],
      "IgnoreEntryFiles": [ ".ico", ".js", ".css", ".woff", ".woff2", ".svg", ".ttf", ".jpg", ".jpeg", ".png", ".gif", ".bmp" ],
      "IgnoreNullReference": true
    },
    "Sampling": {
      "SamplePer3Secs": -1,
      "Percentage": -1.0
    },
    "Transport": {
      "TokenServerEndpoint": "https://fast-tools.mypaas.com.cn/api/sts/serverlog",
      "QueueSize": 1572864,
      "BatchSize": 3072
    }
  }
}
CodeReader

CodeReader 由ReaderType与ReaderKey 组成

ReaderType支持 Cookie、QueryString、Registry、Environment

ReaderType 说明 示列
Cookie 从HttpRequest.Cookies中获取 {"ReaderType": "Cookie", "ReaderKey": "keeplastname" }
QueryString 从HttpRequest.QueryString中获取 {"ReaderType": "QueryString", "ReaderKey": "tenant_code" }
Registry 从Windows注册表中获取 {"ReaderType": "Registry", "ReaderKey": "HKEY_LOCAL_MACHINE\\SOFTWARE\\mysoft\\customer\\CustomerId" }
Environment 从系统环境变量中读取 {"ReaderType": "Environment", "ReaderKey": "CUSTOMERID" }

results matching ""

    No results matching ""