用途:axiom-apl 是 Axiom 的 APL(Axiom Processing Language)查询语言参考技能,用于分析可观测性数据,帮助编写、调试和优化 APL 查询。官方文档见 https://axiom.co/docs/apl/introduction,CLI 用法见 references/cli.md。
主要能力:提供运算符、函数、查询模式、常见错误与 OpenTelemetry 字段映射等参考内容。核心工作流为:先用 axiom dataset list -f json 列出数据集;再用 ['<dataset>'] | getschema 发现字段结构(资料强调必须先做,不要猜测字段名);用 ['<dataset>'] | limit 10 采样数据;最后编写查询。
语法要点:数据集引用可用 ['dataset-name'](含点或短横线时必须用方括号)或简单标识符;字段引用可用 field_name 或 ['field.with.dots'],OTel 数据如 ['service.name']。基本结构为 ['dataset'] | where <condition> | extend <new_field> = <expression> | summarize <aggregation> by <grouping> | project <fields> | sort by <field> desc | limit 100。时间处理建议先按时间过滤,支持 ago(1h)、now()、datetime(...)、bin(_time, 5m)、bin_auto(_time) 等。
适用场景:编写或调试 APL 查询、了解运算符与函数、按用例查找查询模式、处理 OTel 数据。
限制:简单字段查找应直接用 getschema,不必调用完整技能;已有可用查询时无需重复调用;实时告警应使用 Axiom Monitors 而非临时查询。具体收费、价格与平台信息暂未提供。