Details: Internally we already have a Monitoring app that displays exceptions and loads of other data. I've already put up in my scratch org an Aura component that lists all governor limits for the org & how many we've used numerically based on a blog post I found, but I want to find where in my org the errors themselves are logged when we hit a governor limt, and figure out how to extract it for reporting & trending.
My assumption is Salesforce is Splunking at the instance level, then aggregating their data out by org when they provide us with reports. Below is an example:
Developer script exception from [Company] : MyTrigger : MyTrigger: System.LimitException: Too many SOQL Queries: 101 at common.apex.runtime.impl.ApexTriggerExecutor.execApexTriggers(ApexTriggerExecutor.java:108)
Developer script exception from [Company] : MyAwesomeAPIClass : Apex CPU time limit exceeded
etc.
I have to admit my ignorance, I’m not sure exactly where these are written or how to extract them. Earlier today I was querying the ApexLog and found some errors that reference back to SystemLog, but nowhere near the volume I would expect based on my weekly reports I get from Salesforce.
SELECT Application,DurationMilliseconds,Id,LastModifiedDate,Location,LogLength,LogUserId,Operation,Request,RequestIdentifier,StartTime,Status,SystemModstamp FROM ApexLog WHERE Status != 'Success'
/* I get a couple back where Status = ‘Apex CPU time limit exceeded’ and Location = ‘SystemLog’ */
I’d like to extract these somehow internally, not using Splunk if possible. Salesforce already Splunks my org for a weekly report, but if I can figure out where these live and possibly expose them (Einstein / Tableau data flows are my first theory), I could report it live internally. The other thing I thought of off the top of my head is if this can’t be pulled in via a dataflow maybe there would have to be a trigger on whatever they’re written to in order to extract them to a custom object I can easily report on.
This afternoon I’m taking another crack at figuring out where these live in terms of what Einstein / Tableau can see just for “fun.” We do have Event Monitoring enabled
답변 1개
Hi K,
Sorry for the inconvenience. In case you don't receive a response here, may I also suggest joining the group below to collaborate with the experts for best practice and advice.
https://developer.salesforce.com/forums#!/feedtype=RECENT&criteria=ALLQUESTIONS&
Hope this helps.
Regards,
#.redirect