axiom-apl

โดย axiomhq

เอกสารอ้างอิงภาษาแบบสอบถาม APL สำหรับ Axiom ให้ตัวดำเนินการ ฟังก์ชัน รูปแบบ และการใช้งาน CLI ถูกเรียกใช้โดยอัตโนมัติโดยทักษะ Axiom เฉพาะทางเมื่อเขียนหรือ…

npx skills add https://github.com/axiomhq/cli --skill axiom-apl

Axiom Processing Language (APL)

APL is Axiom's query language for analyzing observability data. This skill provides comprehensive guidance for writing, debugging, and optimizing APL queries.

Quick Reference

Documentation: https://axiom.co/docs/apl/introduction

CLI usage: See references/cli.md

Core Workflow

1. List Available Datasets

axiom dataset list -f json

2. Discover Schema (CRITICAL - Always Do First)

['<dataset>'] | getschema

Never guess field names. The schema shows all fields with their types.

3. Sample Data

['<dataset>'] | limit 10

4. Write Query

See references for operators, functions, and patterns.

APL Syntax Essentials

Dataset Reference

['dataset-name']           // Bracket notation (required for names with dots/dashes)
dataset_name               // Plain identifier (only for simple names)

Field Reference

field_name                 // Plain field
['field.with.dots']        // Bracket notation for dotted fields
['service.name']           // OTel data (see references/otel.md for field mappings)

Basic Query Structure

['dataset']
| where <condition>
| extend <new_field> = <expression>
| summarize <aggregation> by <grouping>
| project <fields>
| sort by <field> desc
| limit 100

Time Handling

Always filter by time first - it's the most selective filter.

// Relative time
| where _time >= ago(1h)
| where _time >= ago(24h) and _time < ago(1h)

// Absolute time
| where _time >= datetime(2024-01-15T10:00:00Z)
| where _time between (datetime(2024-01-15) .. datetime(2024-01-16))

Time functions:

  • ago(timespan) - Relative past time
  • now() - Current time
  • datetime(string) - Parse datetime
  • bin(_time, 5m) - Time bucketing
  • bin_auto(_time) - Automatic bucketing

When NOT to Use

  • Simple field lookup: Use getschema directly instead of invoking the full skill
  • Known query patterns: If you already have a working query, don't re-invoke for syntax help
  • Real-time alerting: Use Axiom Monitors for continuous alerting, not ad-hoc queries

References

Skills เพิ่มเติมจาก axiomhq

detect-anomalies
axiomhq
ตรวจจับความผิดปกติในชุดข้อมูล Axiom โดยใช้การวิเคราะห์ทางสถิติ ใช้เมื่อต้องการหารูปแบบที่ผิดปกติ ปริมาณที่พุ่งสูง ค่าผิดปกติ หรือประเภทข้อผิดพลาดใหม่ใน…
official
explore-dataset
axiomhq
สำรวจชุดข้อมูล Axiom เพื่อทำความเข้าใจสคีมา ฟิลด์ ปริมาณ และรูปแบบ ใช้เมื่อค้นพบชุดข้อมูลใหม่ ตรวจสอบโครงสร้างข้อมูล หรือ...
official
find-traces
axiomhq
วิเคราะห์ distributed traces ของ OpenTelemetry จาก Axiom ใช้เมื่อตรวจสอบ trace ID, ค้นหา traces ตามเกณฑ์ (ข้อผิดพลาด, ความหน่วง, บริการ) หรือกำลังดีบัก…
official
gilfoyle
axiomhq
เอเจนต์ SRE ที่ทำในสิ่งที่คุณทำไม่ได้ ค้นหาสแต็กการสังเกตการณ์ของคุณ ค้นหาสาเหตุที่แท้จริง ไม่ตื่นตระหนก ไม่เดาสุ่ม ไม่สนใจความรู้สึกของคุณ ใช้…
official
axiom-sre
axiomhq
ผู้เชี่ยวชาญด้าน SRE สำหรับการตรวจสอบเหตุการณ์และการดีบัก ใช้วิธีการที่ขับเคลื่อนด้วยสมมติฐานและการคัดแยกอย่างเป็นระบบ สามารถสอบถามข้อมูลการสังเกตการณ์ของ Axiom ได้เมื่อพร้อมใช้งาน…
official
building-dashboards
axiomhq
ออกแบบและสร้างแดชบอร์ด Axiom ผ่าน API ครอบคลุมประเภทแผนภูมิ รูปแบบการสอบถาม APL และ metrics/MPL, SmartFilters, เค้าโครง และตัวเลือกการกำหนดค่า ใช้เมื่อ...
official
controlling-costs
axiomhq
วิเคราะห์รูปแบบการค้นหา Axiom เพื่อหาข้อมูลที่ไม่ได้ใช้งาน จากนั้นสร้างแดชบอร์ดและระบบตรวจสอบเพื่อปรับต้นทุนให้เหมาะสม ใช้เมื่อถูกขอให้ลดต้นทุน Axiom ค้นหาข้อมูลที่ไม่ได้ใช้…
official
query-metrics
axiomhq
ดำเนินการสอบถามเมตริกกับ Axiom MetricsDB ผ่านสคริปต์ ค้นหาเมตริก แท็ก และค่าแท็กที่มีอยู่ ใช้เมื่อถูกขอให้สอบถามเมตริก สำรวจเมตริก…
official