该SDK是用于广告等接口提供日志监控服务的lua版sdk
- **该sdk会在服务器端缓存1k的日志,需要在服务器开启lua_shared_dict
- **luajit版本目前兼容lua 5.1 API+ABI, 需要安装luasocket的2.0.2版本
参数 |
值类型 |
默认值 |
说明 |
disabled |
boolean |
false |
是否关闭采样服务 |
buffer_key |
string |
sensor_log |
日志缓存名称 |
参数 |
值类型 |
默认值 |
说明 |
buffer_size |
integer |
1024 |
日志缓存大小 |
sensor_server.host |
string |
10.79.80.109(测试ip) |
日志服务器ip |
sensor_server.port |
integer |
29981 |
日志服务器监听端口号 |
prefix.*.key |
string |
acc.sso.、gauge.sso.、spl.sso. |
日志记录前缀 |
prefix.*.rule |
string |
ACC、NUM |
udp协议规则前缀 |
http {
lua_shared_dict buffer 1m
server {
location /sensor {
content_by_lua '
local cfg = {
}
client = require "src.client"
hc = client.new(cfg)
hc:acc("api.ceshi.cc.ok", 1)
';
}
}
}