This year I wrote two open-source apps for Dynatrace users. As they gained in popularity, now hundreds of users each, so did the pace of new feature requests. So too did the risk of introducing bugs with all the rapid change. Wouldn’t it be great if I had an industry-leading software intelligence platform to monitor these apps, pinpoint root causes of slow performance or errors, and gain insights about my users’ experience? At Dynatrace we live and breathe the concept of “Drink Your Own Champagne” (DYOC), so of course, I want to use Dynatrace to monitor my apps. But these are not your traditional apps; there’s nowhere to install OneAgent. How can I gain all the great insights of Dynatrace without the magic of OneAgent? Agentless RUM, OpenKit, and Metric ingest to the rescue!
First, let’s explore the architecture of these apps:
With that simple copy-paste, I now have all the performance, errors, and user experience data for BizOpsConfigurator!
For Dashboard Powerups we cannot use Agentless RUM as we did above for two reasons:
1) RUM is already injected into the webpage context
2) we need to monitor both contexts as one app.
Ok, so we can’t use OneAgent or Agentless RUM…now what? OpenKit provides an easy manual alternative to handle any other one-off scenario you might run into. In fact, Dynatrace customers use OpenKit to monitor many digital touchpoints like ATMs, kiosks, and IoT devices. With the SDK you wrap your application code to report Sessions and Actions. For Powerups, an Action is reported each time a dashboard is PoweredUp and is part of a Session.
To capture important monitoring data from both the webpage and extension contexts, OpenKit should be inserted into the extension context in a background script. Message passing should be used to get the monitoring data from the webpage context to the extension.
Window.postMessage is used to pass a message from the webpage to the extension and
chrome.runtime.sendMessage is used within the extension.
Additionally, you can report an error caught from a try/catch block as either an error or a crash.
Now we have performance and errors all covered:
Now that I have visibility into performance and errors, I’m able to cope with the rate of change and proactively address issues; but let’s not stop there! Now that we know there are hundreds of happy users for each application, we want to know even more:
- Who are these users? How can I segment them?
- What are they using the app for?
- What insights can we gain from usage metrics that we can feed-back to our product management teams?
Digital Business Analytics can help answer those questions.
After slicing and dicing the data using those tools, I now understand how I want to look at the data for long term trending and dashboarding. Doing so is as simple as a click on the Create Metric button and then Pin to Dashboard.
For Dashboard Powerups, I could also use User Session and Action Properties, but I needed even more flexibility on the dimensions of my data. So here I chose the Metric Ingest API (
/api/v2/metrics/ingest). I simply needed to create the metric payload with a comma-separated list of dimensions:
I also included the special
dt.entity dimension to ensure the metric is attached to the Smartscape topology and analyzed by Davis, as described in this blog post. After creating the payload, a simple XHR can POST the data to the API endpoint. Caution, while you should always be careful with API tokens, extra care should be taken when using a token in a user-facing application. Be sure to minimize the token scope and as always, ensure it is not publicly exposed in public code repositories.
Once the data is reported, Explorer can be used to visualize the data and pin to the dashboard.
So, what did we find out?
From the BizOpsConfigurator analytics, we were able to draw conclusions about which dashboard packs to focus on next. We were also able to give recommendations to our product management team on where an out-of-the-box workflow might provide value. Similarly, for the Powerups data, we could draw conclusions about which visualizations customers thought were useful. Interestingly, there were significant differences between customer and internal (e.g. Sales Engineers) usage.
Ready to get started?
Ready to gain visibility, ramp-up performance, conquer errors, and up-level business insights into all your applications? Contact your Dynatrace Sales Engineer for a demo or POC of DEM and Business Analytics. New to Dynatrace? Try our free trial!