PRX / pixel.prx.org

API Gateway pixel tracker
GNU Affero General Public License v3.0
0 stars 0 forks source link

Send to kinesis #2

Closed cavis closed 5 years ago

cavis commented 5 years ago

Start sending records for valid pings along to the analytics-ingest-lambda kinesis. Use an ENV variable to configure which stream.

Records should have the format:

{
  "type": "pixel",
  "timestamp": 1487703699,
  "remoteAgent": "user-agent-string",
  "remoteIp": " 50.21.204.248, 127.0.0.1",
  "remoteReferrer": "https://www.prx.org/originating/page.html",
  "key": "the-key-query-param",
}

For now we may also want to whitelist keys, and only send on known keys to kinesis.