1.0.0 • Published 10 months ago

@moneyforward_i/datadog-query-parser v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
10 months ago

datadog-query-parser

datadog-query-parser is a parser library for Datadog queries built around ohm-js.

Installation

Using npm

$ npm i datadog-query-parser

Usage

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"]}

Releasing

Preparing a release

  • Bump up a package version of package.json. A Git commit will be created automatically.
npm version <new version>
  • Push the change to the main branch as usual.

Creating a release

  • 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.
1.0.0

10 months ago