Admin: RPI Realtime decisions - Logging
Realtime Agent Logging
To enable Realtime Agent logging, modify the TraceLogEnabled
setting in the Realtime Agents web.config
file by setting the value to True
.
Realtime API Logging
If Realtime is deployed on Azure AppService, please refer to this article on how to configure tracing.
Turning on logging, especially verbose logging, will impact the performance of the Realtime API. Anything higher than “Error” level logging should only be left on when debugging an issue.
Logging can be enabled by editing the "Logging" section of the Realtime API's appsettings.json.config
file. By default, RPI ships with all logging turned off, and turning on logging comes with a performance penalty so use judicially:
Set the
File.LogLevel.Default
property to "Trace”.Make sure the
FileLogging.LogDirectory
property is set to a path that exists on the server where the Realtime API is running.
Here is an example of what a log file with full tracing looks like:
One of the particularly useful pieces of information that is logged is the web visitor cache profile. Here is a sample visitor profile:
2020-01-07 08:24:08.343 -05:00 [Trace] RPI Realtime: ************ 2020-01-07 08:24:08:343 [14] ************
Entry type : visitor
ID : e40fd6c0-4846-4435-861d-8a1a5554e711
Device ID : 61cd6d85-d983-448e-ab93-37276779d3b8
Entry:
{
"lastActivity": "2020-01-07T08:24:08.287928-05:00",
"lastSavedDateUTC": "2020-01-07T13:24:08.3433456Z",
"isMasterProfile": "False",
"clientID": "11111111-1111-1111-1111-111111111111",
"lTransfer": "2020-01-07T08:24:08.3433456-05:00",
"Values": [
{
"n": "Number of visits",
"i": "fe7e61b1-dfc8-492a-a452-ed727a3f0c22",
"u": "2019-12-11T13:25:12.3748768-05:00",
"iLE": "False",
"v": "1",
"vfmt": "int"
},
{
"n": "Language",
"i": "6930beb7-ce98-4b8a-a00b-2bfd8fe0757d",
"u": "2019-12-11T13:25:12.3788687-05:00",
"iLE": "False",
"v": "English (United States)",
"vfmt": "str"
},
{
"n": "Region",
"i": "1945768d-7970-4e6c-aa4c-91c336f784df",
"u": "2019-12-11T13:25:12.3788687-05:00",
"iLE": "False",
"v": "United States",
"vfmt": "str"
},
{
"n": "product_affinity",
"i": "00000000-0000-0000-0000-000000000000",
"u": "2020-01-07T08:24:04.6594226-05:00",
"iLE": "True",
"v": "SKI",
"vfmt": "str"
},
{
"n": "pid",
"i": "00000000-0000-0000-0000-000000000000",
"u": "2020-01-07T08:24:04.6594226-05:00",
"iLE": "True",
"v": "50002",
"vfmt": "str"
}
],
"DBVals": [
{
"n": "PRODUCT_AFFINITY",
"d": "2020-01-07T08:24:08.287928-05:00",
"v": [
"SKI"
]
},
{
"n": "MARITAL_STATUS",
"d": "2020-01-07T08:24:08.287928-05:00",
"v": [
"Married"
]
},
{
"n": "LOYALTY_LEVEL",
"d": "2020-01-07T08:24:08.287928-05:00",
"v": [
"VIP ELITE"
]
},
{
"n": "INCOME",
"d": "2020-01-07T08:24:08.287928-05:00",
"v": [
"$125,000-$149,999"
]
},
{
"n": "GENDER",
"d": "2020-01-07T08:24:08.287928-05:00",
"v": [
"M"
]
},
{
"n": "EDUCATION",
"d": "2020-01-07T08:24:08.287928-05:00",
"v": [
"Bachelor Degree likely"
]
}
],
"Location": {
"lon": "-71.2517719",
"lat": "42.3186319",
"upd": "2020-01-07T08:23:49.6236805-05:00",
"loc1": "Norfolk Co.",
"loc2": "MA",
"loc3": "Wellesley",
"pl": "02481",
"ctry": "United States"
},
"isHistoryCached": "False",
"lGoalReg": "2020-01-07T08:24:08.3423481-05:00",
"isMHReq": "False",
"GoalRegs": [
{
"gn": "Goal",
"d": "2020-01-07T08:24:08.3433456-05:00",
"i": 0,
"pg": "/",
"cnt": "5e7ace86-0a76-4c61-9530-169f16435531",
"exp": "2020-01-07T09:24:08.3433456-05:00"
}
],
"Pages": [
{
"n": "/",
"h": "retaildemo-local.rphelios.net",
"lV": "2020-01-07T08:24:08.2889234-05:00",
"lDec": "2020-01-07T08:24:08.3423481-05:00",
"pubid": 0,
"noV": 9,
"dyn": [
{
"id": "0f9d7581-2c66-497c-86d7-7487163beada",
"ix": "7"
},
{
"id": "5e7ace86-0a76-4c61-9530-169f16435531",
"ix": "3"
},
{
"id": "fa2693b9-8fbf-4874-9b32-5e4611d331a1",
"ix": "2"
},
{
"id": "e452c1fe-1e87-4ad9-bb78-a33a4547fbd5",
"ix": "10"
},
{
"id": "b28c0aa4-092b-4447-af55-fa05514d86f0",
"ix": "4"
}
]
}
],
"Decs": [
{
"id": "0f9d7581-2c66-497c-86d7-7487163beada",
"r": 7,
"n": "J&J-SiteProdAffinity",
"d": "2020-01-07T08:24:08.2988992-05:00"
},
{
"id": "5e7ace86-0a76-4c61-9530-169f16435531",
"r": 3,
"n": "Hompage Promo",
"d": "2020-01-07T08:24:08.3423481-05:00"
},
{
"id": "fa2693b9-8fbf-4874-9b32-5e4611d331a1",
"r": 2,
"n": "Homepage Merchandising",
"d": "2020-01-07T08:24:08.3008923-05:00"
},
{
"id": "e452c1fe-1e87-4ad9-bb78-a33a4547fbd5",
"r": 10,
"n": "Homepage Hero",
"d": "2020-01-07T08:24:08.3423481-05:00"
},
{
"id": "b28c0aa4-092b-4447-af55-fa05514d86f0",
"r": 4,
"n": "Homepage Carousel",
"d": "2020-01-07T08:24:08.3423481-05:00"
}
]
}
A few notes on the entry above:
In the “Values” array, the entries with the unique GUIDs are RPI Realtime managed parameters, and the ones with the placeholder GUIDs that looks like this “00000000-0000-0000-0000-000000000000” are Realtime parameters that have been added from the web site tracking code (e.g., via URL parameters).
"Values": [
{
"n": "Number of visits",
"i": "fe7e61b1-dfc8-492a-a452-ed727a3f0c22",
"u": "2019-12-11T13:25:12.3748768-05:00",
"iLE": "False",
"v": "1",
"vfmt": "int"
},
{
"n": "Language",
"i": "6930beb7-ce98-4b8a-a00b-2bfd8fe0757d",
"u": "2019-12-11T13:25:12.3788687-05:00",
"iLE": "False",
"v": "English (United States)",
"vfmt": "str"
},
{
"n": "Region",
"i": "1945768d-7970-4e6c-aa4c-91c336f784df",
"u": "2019-12-11T13:25:12.3788687-05:00",
"iLE": "False",
"v": "United States",
"vfmt": "str"
},
{
"n": "product_affinity",
"i": "00000000-0000-0000-0000-000000000000",
"u": "2020-01-07T08:32:42.7505231-05:00",
"iLE": "True",
"v": "SKI",
"vfmt": "str"
},
{
"n": "pid",
"i": "00000000-0000-0000-0000-000000000000",
"u": "2020-01-07T08:24:04.6594226-05:00",
"iLE": "True",
"v": "50002",
"vfmt": "str"
}
],
The “DBVals” property contains values that have been sourced from the RPI data warehouse or auxiliary DB and the date they were last refreshed:
"DBVals": [
{
"n": "PRODUCT_AFFINITY",
"d": "2020-01-07T08:32:42.8478139-05:00",
"v": [
"SKI"
]
},
{
"n": "MARITAL_STATUS",
"d": "2020-01-07T08:32:42.8478139-05:00",
"v": [
"Married"
]
},
{
"n": "LOYALTY_LEVEL",
"d": "2020-01-07T08:32:42.8478139-05:00",
"v": [
"VIP ELITE"
]
},
{
"n": "INCOME",
"d": "2020-01-07T08:32:42.8478139-05:00",
"v": [
"$125,000-$149,999"
]
},
{
"n": "GENDER",
"d": "2020-01-07T08:32:42.8478139-05:00",
"v": [
"M"
]
},
{
"n": "EDUCATION",
"d": "2020-01-07T08:32:42.8478139-05:00",
"v": [
"Bachelor Degree likely"
]
}
]
The “Pages” array contains the name of the page (
n
), thepublishID
if it's a landing page (pubid
), the # of visits (noV
), and the last visit timestamp (lV
) in the properties.The child "dyn" array contains objects providing the following information:
(1) GUIDs identifying any Realtime dynamic assets on the page (
id
)The index of which dynamic asset slot was rendered in the decision (
ix
)
"Pages": [
{
"n": "/",
"h": "retaildemo-local.rphelios.net",
"lV": "2020-01-07T08:32:42.8478139-05:00",
"lDec": "2020-01-07T08:32:42.9006723-05:00",
"pubid": 0,
"noV": 10,
"dyn": [
{
"id": "0f9d7581-2c66-497c-86d7-7487163beada",
"ix": "7"
},
{
"id": "5e7ace86-0a76-4c61-9530-169f16435531",
"ix": "1"
},
{
"id": "fa2693b9-8fbf-4874-9b32-5e4611d331a1",
"ix": "2"
},
{
"id": "e452c1fe-1e87-4ad9-bb78-a33a4547fbd5",
"ix": "10"
},
{
"id": "b28c0aa4-092b-4447-af55-fa05514d86f0",
"ix": "4"
}
]
}
],
There is a "Decs" array of objects containing the GUID (
id
), resultsr
, namen
, and timestampd
of decisions that the visitor has been served:
"Decs": [
{
"id": "0f9d7581-2c66-497c-86d7-7487163beada",
"r": 7,
"n": "J&J-SiteProdAffinity",
"d": "2020-01-07T08:32:42.8657663-05:00"
},
{
"id": "5e7ace86-0a76-4c61-9530-169f16435531",
"r": 1,
"n": "Hompage Promo",
"d": "2020-01-07T08:32:42.9006723-05:00"
},
{
"id": "fa2693b9-8fbf-4874-9b32-5e4611d331a1",
"r": 2,
"n": "Homepage Merchandising",
"d": "2020-01-07T08:32:42.8667636-05:00"
},
{
"id": "e452c1fe-1e87-4ad9-bb78-a33a4547fbd5",
"r": 10,
"n": "Homepage Hero",
"d": "2020-01-07T08:32:42.8996744-05:00"
},
{
"id": "b28c0aa4-092b-4447-af55-fa05514d86f0",
"r": 4,
"n": "Homepage Carousel",
"d": "2020-01-07T08:24:08.3423481-05:00"
}
]