19 Jun 2023
08:28 PM
- last edited on
10 Jul 2023
04:12 AM
by
Karolina_Linda
I am looking for an example implementation of Opentelemetry with Partner Hub/ Customer Hub.
there are 2 links where this possibility is declared:
https://engineering.salesforce.com/5-design-patterns-for-building-observable-services-d56e7a330419/
https://engineering.salesforce.com/anomaly-detection-in-zipkin-trace-data-87c8a2ded8a1/
And here it was RFE submitted:
https://ideas.salesforce.com/s/idea/a0B8W00000GdYP7UAN/improve-traceability-of-api-requests-in-end2e...
But will it work with Dynatrace?
(Indeed we are not going to buy SF-shield and Dyna SF plugin)
22 Jun 2023 05:19 PM
I'm a bit confused as to what is the question here.
The first link describes general design patterns / best practices for software development. The second one describes how Salesforce works with their traces internally. The third is an RFE that would allow connecting observability data inside Salesforce with observability data outside of Salesforce.
Please correct me if I'm reading that incorrectly.
You can ingest OpenTelemetry data into Dynatrace of course. If I understand your question correctly, you would like to ingest the trace data Salesforce collects into Dynatrace.
From my experience, the hurdles for such a setup usually are not so much technical as they are commercial - OpenTelemetry data from a SaaS platform could allow valuable insights into the SaaS platform, but could also expose technical data from that platform which may be considered trade secrets. So you'd have to discuss that with Salesforce first.
22 Jun 2023
07:44 PM
- last edited on
01 Aug 2023
08:09 PM
by
ghaydtner
"You can ingest OpenTelemetry data into Dynatrace of course."
Sorry but do you have successful proof, or is this just "theoretical"?
We failed. The default aura API has dead-end info SF - all traces, headers are wiped out.
23 Jun 2023 03:12 PM
No, this is not theoretical. I know it works because I've seen it work (NB: Not with data from Salesforce).
However, I still think there is a misunderstanding.
Dynatrace can ingest OpenTelemetry data; OpenTelemetry is a standard (independent of vendors like Salesforce). What I don't know is whether Salesforce will provide that data to customers. I haven't found anywhere in the articles where it says they do that (they say they use it internally, but that doesn't mean that you can access that data from the outside).
I also wouldn't be surprised if they didn't expose that data publicly.
23 Jun 2023 05:25 AM
Hi Slawa, Dynatrace support traces ingested by Open Telemetry, please refer to docs here. https://www.dynatrace.com/support/help/extend-dynatrace/opentelemetry
That being said, Salesforce or whichever source of traces you are working with that is compatible with Otel should be able to communicate with Dynatrace.
23 Jun 2023 07:46 PM
AFAIK - you don't have hands-on experience with the Salesforce platform + Open telemetry.
But I am looking exactly a success case to not waste time.
26 Jun 2023 04:10 PM
@Slawa
What I've been trying to tell you is that I don't believe Salesforce exposes their OpenTelemetry data publicly, so until I see information to the contrary I believe an integration will not be possible.
28 Jun 2023 09:10 AM - edited 28 Jun 2023 09:14 AM
@Slawa, I second what @ben_wrightson wrote, the question is not entirely clear to me either, I am afraid.
Are you asking if you can ingest OpenTelemetry data with Dynatrace? If so, yes, absolutely. You can find more information on the OTLP specifics at https://www.dynatrace.com/support/help/shortlink/opentelemetry-otlp. Please do note, Dynatrace currently only supports binary-encoded messages on HTTPS.
If your setup uses technology listed at https://www.dynatrace.com/support/help/shortlink/opentelemetry-oneagent, you could also use OneAgent to have it automatically ingested.
However, that all requires that your platform does create and emit the necessary OpenTelemetry signals.
28 Jun 2023 12:22 PM
Sorry, maybe I mislead
The question was only for people who had hands-on experience with Salesforce + Dynatrace.
Will it works E2E or not? From hands-on experience.
Please ignore this topic.
No theory, no one agent (who works with SF - knows that in SaaS that's not possible, only PaaS Heroku with the limitation for traces)
17 Feb 2025 08:15 PM
Hi @Slawa,
I am also working on a solution to ingest enterprise Salesforce data into Dynatrace. Have you found any solutions here?
Thanks,
Cullin
18 Feb 2025 02:02 AM
@Slawa , if you are not going to purchase the available plugins, then your options are limited.
you're not really providing much about what you have in Sales Force, so here's a generic answer.
Only relevant if you have custom apps.
You can use Apex to create custom HTTP callouts to send traces or custom events to Dynatrace.
This will involve:
Creating a HTTP Callout to Dynatrace by using Apex to make a HTTP callout to the Dynatrace API endpoint.
you'll need an apex class sort of like the below.
public class DynatraceIntegration {
// The endpoint for Dynatrace custom events API
private static final String DYNATRACE_API_URL = 'https://{environmentid}.live.dynatrace.com/api/v1/events';
private static final String DYNATRACE_API_TOKEN = 'YOUR_DYNATRACE_API_TOKEN';
public static void sendCustomEvent(String eventName, String eventDetails) {
// Prepare the request headers
Map<String, String> headers = new Map<String, String>();
headers.put('Authorization', 'Api-Token ' + DYNATRACE_API_TOKEN);
headers.put('Content-Type', 'application/json');
// Prepare the request body
String body = '{"eventType":"CUSTOM","title":"' + eventName + '","description":"' + eventDetails + '","source":"Salesforce Apex","customProperties":{"salesforceEvent":"true"}}';
// Send the HTTP request to Dynatrace
HttpRequest req = new HttpRequest();
req.setEndpoint(DYNATRACE_API_URL);
req.setMethod('POST');
req.setHeaders(headers);
req.setBody(body);
Http http = new Http();
HttpResponse res = http.send(req);
// Log the response
System.debug('Dynatrace Response: ' + res.getBody());
}
}
You can then trigger this class when specific events occur in your Salesforce environment.
// Trigger this in your Apex logic when an event occurs
DynatraceIntegration.sendCustomEvent('Record Updated', 'Salesforce record has been updated successfully.');
If you don't have a custom App, then the only other option is to us the SF API to get events into Dynatrace.
This will involve you creating a custom integration: Dynatrace Extensions Python SDK — Dynatrace Docs
based on your own version of: Salesforce Extension monitoring & observability | Dynatrace Hub
This will allow you go get events based on API calls, user actions, or login events. You would need to host this on a local Active Gate and pull the data.
The RUM components, you can just rip off the extension steps.
Anyway, have fun building your own solution.