jongpie / NebulaLogger

The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, Process Builder & integrations.
https://nebulalogger.com
MIT License
691 stars 164 forks source link

Adhoc Logging at a specified line of code without needing a Logger statement in production code #365

Open jkranz-rk opened 2 years ago

jkranz-rk commented 2 years ago

New Feature Summary

Due to platform limitations with a logging tool like nebula, it is necessary to leave logging statements throughout production code in order to take advantage of a logging utility such as this. This means you either place logging statements everywhere, but more practically you try to be smart about where you place logging statements. As a development team gets up to speed on how to be smart about this, and particularly as a large legacy code base takes time to incorporate logging statements, you'll end up needing to troubleshoot the state of your code at a given point that doesn't have a logging statement.

It would be nice if there was a way to hook in something like the Tooling API's ApexExecutionOverlayAction / ApexExecutionOverlayResult feature into nebula-logger that would allow a developer to specify a line of code in an Apex Class, execute the code, and have the state of the execution at that line dump into Nebula Logs for ad hoc troubleshooting/debugging.

jongpie commented 2 years ago

@jkranz-rk just to follow up on our discussion about this on sfxd, I think this is an incredible idea that would help with both initial adoption of Nebula Logger for orgs that have not implemented logging, as well as helping with on-demand logging for troubleshooting prod issues. I'm hoping in the next few months to have something added into Nebula that leverages Apex Execution Overlays - I'll be expanding on the basic prototype that I tried out last week. I'll keep you updated on my progress!