Created
March 22, 2017 17:31
-
-
Save wkj/b04fabc76ee4445ed8db52b71c540604 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function transform_payload(payload) { | |
var headers = {"content-type": "application/json", | |
"X-Insert-Key": "newrelic-insights-insert-api-key"}; | |
var body = [{"eventType": payload["event"], | |
"timestamp": Date.parse(payload["timestamp"]), | |
"session_id": payload["session"]}]; | |
return {"status": "ok", "headers": headers, "body": body}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment