Open RaviVaranasi opened 1 year ago
@RaviVaranasi I would look at the Slack plugin for the canonical way to publish log entries off-platform (as far as architecture is concerned; this isn't to say that you must send log entries to Slack if they're going off-platform, just that the way that this plugin is built should answer the question of "how to do this.")
I'm sure @jongpie can add additional info - and perhaps an official DataDog plugin can also be supported - but if you're looking to build out this functionality and the question is just "is it possible," the architecture in the Slack plugin should be enough to get going!
Thanks for the feedback. If we ship the logs to DataDog, can we not create Log objects in SF?
You still can!
@RaviVaranasi I've previously done some integrations other tools like Loggly, but I haven't used Datadog myself before, so I'm not familiar with their API or how to best integrate with them. But to expand on what @jamessimone has said, I think there are 2-3 ways you could approach this type of integration:
Log__c
and LogEntry__c
data to DatadogAs @jamessimone pointed out, the Slack plugin is a great example of how plugins for Nebula Logger are structured. This plugin in particular also leverages Log__c
and LogEntry__c
data, so if you want to still store data in Salesforce (in addition to storing it in Datadog), then I would mimic the Slack plugin's approach
Log__c
and LogEntry__c
LogEntryEvent__e
or Log__c
/LogEntry__c
data to DatadogIf you're worried about the storage usage of the custom objects in your org, and you want to control if some or all Nebula Logger instead goes just to Datadog, then you can take a look at the Big Object Archiving plugin. The Big Object Archiving plugin lets you choose per user if Nebula Logger's LogEntryEvent__e
data is stored in Log__c
/LogEntry__c
, or only stored in a custom big object (LogEntryArchive__b
). You could have a similar plugin for Datadog that lets you control per user if logging data is stored in Salesforce, Datadog, or both
I'm not sure what's involved with setting up this option (because I haven't used Datadog before), but since Nebula Logger uses platform events to create LogEntryEvent__e
data, you can probably setup Datadog to subscribe directly to LogEntryEvent__e
object using the pub/sub API.
Hope this helps, but let us know if you have questions!
@jongpie any chance you know any resources / examples how to log apex metrics (mostly around performance)?
FWIW Datadog does have a connector for Event Monitoring https://docs.datadoghq.com/integrations/salesforce/
FWIW Datadog does have a connector for Event Monitoring https://docs.datadoghq.com/integrations/salesforce/
Does this do logging?
Instead of actively targeting a single provider like DataDog, it would possibly be more beneficial to target an open standard, e.g. OpenTelemetry (which DataDog supports).
@jonathankretzmer I agree, I think it makes more sense to target the OpenTelemetry standard, instead of vendor-specific integrations. There was recently a discussion about this too, so I think a lot of people would benefit from using OpenTelemetry. I've started some initial analysis & prototyping on this already - I'm hoping to work on it more over the next several weeks.
New Feature Summary
Can I ship logs to DataDog instead of logging inside Salesforce? The advantage is to have one logging system across multiple systems