Axiom Processing Language (APL) is a text-based query language for logs, traces, and events stored in EventDB. It provides the flexibility to filter, manipulate, and summarize your data exactly the way you need it.Documentation Index
Fetch the complete documentation index at: https://axiom.co/docs/llms.txt
Use this file to discover all available pages before exploring further.
You can’t use APL to query metrics. To query metrics, use MPL.
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
Build an APL query
APL queries consist of the following:- Data source: The most common data source is one of your Axiom datasets.
- Operators: Operators filter, manipulate, and summarize your data.
|).
A typical APL query has the following structure:
DatasetNameis the name of the dataset you want to query.Operatoris an operation you apply to the data.
Apart from Axiom datasets, you can use other data sources:
- External data sources using the externaldata operator.
- Specify a data table in the APL query itself using the
letstatement.
Example query
github-issue-comment-event as its data source. It uses the following operators:
- extend adds a new field
isBotto the query results. It sets the values of the new field to true if the values of theactorfield in the original dataset contain-botor[bot]. - where filters for the values of the
isBotfield. It only returns rows where the value is true. - summarize aggregates the data and produces a chart.
|).
Example result
As a result, the query returns a chart and a table. The table counts the different values of theactor field where isBot is true, and the chart displays the distribution of these counts over time.
| actor | count_ |
|---|---|
| github-actions[bot] | 487 |
| sonarqubecloud[bot] | 208 |
| dependabot[bot] | 148 |
| vercel[bot] | 91 |
| codecov[bot] | 63 |
| openshift-ci[bot] | 52 |
| coderabbitai[bot] | 43 |
| netlify[bot] | 37 |
The query results are a representation of your data based on your request. The query doesn’t change the original dataset.
Quote dataset and field names
If the name of a dataset or field contains at least one of the following special characters, quote the name in your APL query:- Space (
) - Dot (
.) - Dash (
-)
' or ") and square brackets ([]). For example, ['my-field'].
For more information on rules about naming and quoting entities, see Entity names.