Akamai with New Relic


Few Dev Challenges
- Akamai used the content type "application/x-www-form-urlencoded", which was not documented.
- We originally tried to include Response Headers, however Akamai was sending invalid JSON, so we removed them.
Akamai Integration Value
-
Gain real-time visibility into web, and API traffic
-
Monitor SLA of the service
-
Customer Error Recording
-
Transaction tracking
-
External Service Call recording
Sample AkamaiEvent
{
"akamaiId": "534723175e139dca27f5e6f5",
"akamaiLatency": 60,
"asNum": "53766",
"cacheStatus": 0,
"clientIP": "159.100.160.36",
"httpResponseCode": 200,
"originLatency": 50,
"originRetry": 0,
"requestHostName": "homenetauto.signin.coxautoinc.com",
"requestLength": 0,
"requestMethod": "GET",
"requestPath": "/authorize/",
"requestPort": "443",
"requestProtocol": "https",
"requestQuery": "solutionid=HME_prod&state=Qjk5bnJuelRuZkl5bG05bnJmNGtTS09PdnhTWjFPNHV3ZnpUUVZWTGJpTjJhK2NXb0xQWExRUm1GU3Rhck5mRg&client_id=fa9a52ac-a979-4501-bcdd-e5deb59df779&response_type=code&login_hint&display&redirect_uri=https://authorize.coxautoinc.com/oauth2/v1/authorize/callback&scope=openid",
"responseContentType": "text/html",
"responseLength": 11270,
"sslVersion": "TLSv1.3",
"timestamp": 1578343882975,
"userAgent": "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
}New Relic Products
- APM
- Browser
- Synthetics
- Infrastructure
New Relic APM
- C SDK
- Go agent
- Java agent
- .NET agent

- Node.js agent
- PHP agent
- Python agent
- Ruby agent
New Relic Browser

New Relic Synthetics

var request = require("request");
var assert = require('assert');
var options = { method: 'POST',
url: 'https://signin.coxautoinc.com/signin',
headers:
{'Content-Type': 'application/vnd.coxauto.v1+json'},
body: '{"client_id":"ea9314f1-32e2-41ad-b575-fb3324f96ed7","response_type":"code","scope":"openid","redirect_uri":"https://authorize.coxautoinc.com/oauth2/v1/authorize/callback","state":"dkZGU2FjenhodUFPVlg4WVRaUFNwT0VwVkdqOFJuU282N0tLWDVmdGhBZzR2d2pBbmNpKzFZd0V5T295dmQ1Rw","password":"test","solutionid":"SAPPR_nonprod","authenticationProvider":"SAPPR_nonprod","username":"hh.solution.only"}' };
request(options, function (error, response, body) {
if (error) throw new Error(error);
//Log status code to Synthetics console.
console.log(response.statusCode + "status code");
//Verify endpoint returns 200 (OK) response code.
assert.ok(response.statusCode == 200, 'Expected 200 OK response');
//Parse JSON received from Insights into variable.
var info = JSON.parse(body);
// asssert response body if needed using info
console.log("End reached");
console.log("Success assertion complete, and end of API signIn test. ");
});
Synthetic Script
New Relic Infrastructure

New Relic Integrations
By Akshay Mittal
New Relic Integrations
- 211