How to use the datadog-metrics.increment function in datadog-metrics

To help you get started, we’ve selected a few datadog-metrics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Nordstrom / serverless-lighthouse-template / handler.js View on Github external
lighthouse(event.target, flags).then(function(results) {
    // Increment the lighthouse counter
    metrics.increment('lighthouse.invoke')

    // Get total page load time metric
    // push metric to datadog, ref: https://github.com/dbader/node-datadog-metrics#gauges
    metrics.gauge("total", results.timing.total)

    // Get the Lighthouse score for the website
    // ref: https://developers.google.com/web/tools/lighthouse/scoring
    metrics.gauge("score", results.score)

    // Parse report blob to extract performance metrics
    results.reportCategories.filter(function(v){
      return v["id"] == "performance"
    })[0].audits.filter(function(v){
      return v["group"] == "perf-metric"
    }).forEach(function(chunk){
github getndazn / dazn-lambda-powertools / packages / lambda-powertools-datadog-metrics / datadog-metrics-sync.js View on Github external
const increment = (key, value=1, tags, timestamp=Date.now()) => {
  metrics.increment(key, value, tags || [], timestamp)
}

datadog-metrics

Buffered metrics reporting via the Datadog HTTP API

MIT
Latest version published 3 days ago

Package Health Score

92 / 100
Full package analysis