How to use the aws-embedded-metrics.Unit.Count function in aws-embedded-metrics

To help you get started, we’ve selected a few aws-embedded-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 fourTheorem / slic-starter / checklist-service / services / checklists / entries / entries.js View on Github external
'#title': 'title',
      '#value': 'value'
    },
    ExpressionAttributeValues: {
      ':title': title,
      ':value': value
    },
    ReturnValues: 'NONE'
  }

  await dynamoDocClient()
    .update(params)
    .promise()

  const metrics = createMetricsLogger()
  metrics.putMetric('EntryWords', title.trim().split(/s/).length, Unit.Count)
  await metrics.flush()

  return {
    entId,
    title,
    value
  }
}
github fourTheorem / slic-starter / checklist-service / services / checklists / entries / entries.js View on Github external
title,
        value
      }
    },

    ReturnValues: 'ALL_NEW'
  }
  const {
    Attributes: { entries }
  } = await dynamoDocClient()
    .update(params)
    .promise()

  const metrics = createMetricsLogger()
  metrics.putMetric('NumEntries', Object.keys(entries).length, Unit.Count)
  metrics.putMetric('EntryWords', title.trim().split(/s/).length, Unit.Count)
  await metrics.flush()

  return {
    entId,
    title,
    value
  }
}

aws-embedded-metrics

AWS Embedded Metrics Client Library

Apache-2.0
Latest version published 2 months ago

Package Health Score

87 / 100
Full package analysis

Similar packages