// for parsing application/json // GET method route app.get('/get-success', function (req, res) { query = {"somefield": {"someinnerfield":"somevalue"}} apm.addTags({"request-url": "/get-success", "query": JSON.stringify(query)}); apm.setCustomContext(query); apm.setUserContext({ id: 12345, username: "test-user", email: "test-user@rapido.bike" }) res.json({ status: "success", response: 'GET request to the success api' }) })