Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish CloudWatch metric for DDB records #81

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/inputs/dynamodb-data.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const AWS = require('aws-sdk');
const cloudwatch = new AWS.CloudWatch({ apiVersion: '2010-08-01' });
const dynamo = require('../dynamo');
const logger = require('../logger');
const timestamp = require('../timestamp');
Expand All @@ -16,6 +18,8 @@ module.exports = class DynamodbData {
constructor(records) {
this._records = (records || []).filter(rec => this.check(rec));

logger.debug('Records for DynamoDB', { count: this._records.length });

// organize into payloads and segments, grouping by key
this.payloads = {};
this.segments = {};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
},
"homepage": "https://github.com/PRX/analytics-ingest-lambda#readme",
"devDependencies": {
"aws-sdk": "^2.802.0",
"chai": "^4.2.0",
"codecov": "^3.1.0",
"dotenv": "^6.2.0",
Expand All @@ -55,6 +54,7 @@
},
"dependencies": {
"@google-cloud/bigquery": "2.0.6",
"aws-sdk": "^2.802.0",
"follow-redirects": "^1.13.0",
"ioredis": "^4.19.2",
"ipaddr.js": "^2.0.0",
Expand Down