@metrics-pli/exporter-bigquery
Google Big Query exporter for metrics-pli metrics.
Last updated 2 years ago by krystianity .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @metrics-pli/exporter-bigquery 
SYNC missed versions from official npm registry.

bigquery-export

Exports collected metrics to Google Big Query Can be hooked up very easily to a metricsPli instance.

You can debug logs via DEBUG=mpli:bqexport. The bigquery config fields accepts all parameters that you can pass to @google-cloud/bigquery.

import MetricsPli, { ConfigInterface, TestInterface } from "@metrics-pli/core";
import Exporter from "@metrics-pli/exporter-bigquery";

const keyFilename = "/Users/jondoe/Documents/jons-plat-123.json";

const exporterConfig = {
    bigquery: {
        projectId: "123123123",
        keyFilename,
    },
    dataset: "my_metrics_dataset",
    table: "my_metrics_table",
    batchSize: 75,
    batchTimeout: 60 * 1000,
};

const tests: TestInterface[] = [{
  name: "Homepage",
  url: "https://google.com/",
}];

const config: ConfigInterface = {};

(async () => {
  const metricsPli = new MetricsPli(tests, config);
  const bqExporter = new Exporter(exporterConfig);

  await bqExporter.init();
  bqExporter.registerWith(metricsPli);

  // will also emit exporter error events
  metricsPli.on("error", console.error);
  metricsPli.on("info", console.info);
 
  await metricsPli.run();
  await bqExporter.close();
})();

Current Tags

  • 0.16.0                                ...           latest (2 years ago)

7 Versions

  • 0.16.0                                ...           2 years ago
  • 0.15.0                                ...           2 years ago
  • 0.14.0                                ...           2 years ago
  • 0.13.0                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
  • 0.11.0                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |