A parser library for Datadog queries
npm install @moneyforward_i/datadog-query-parserdatadog-query-parser is a parser library for Datadog queries built around ohm-js.
Using npm
```
$ npm i datadog-query-parser
To parse a Datadog query, you can pass the query string to the corresponding parser instance.
`
import { MetricQueryParser } from "datadog-query-parser";
const query = "avg:system.cpu.user{host:awesome-instance}"
const parser = new MetricQueryParser();
console.log(JSON.stringify(parser.parse(query)));
// => {"aggregator":"avg","metricName":"system.cpu.user","filters":["host:awesome-instance"]}
`
- Bump up a package version of package.json. A Git commit will be created automatically.
```
npm version
- Push the change to the main branch as usual.
- Create a new release in GitHub by clicking on "Releases" and then "Draft a new release"
- Set the Tag version to a new tag
- Set the Target as main.
- Set the Release title to the tag you created, vX.Y.Z
- Click "Publish release" to save and publish your release.
- GitHub Actions workflow will be triggerd by publishing a new release and the package will be released.