Developing for Synthetics

Good afternoon,

I have up until now been using se-builder w. the New Relic Synthetics exporter, and running these against a local Selenium server (vagrant-selenium). It was brought to my attention that this is unsupported, so this begs the question, what is the supported development flow for scripted browser synthetics? I’m not a developer by trade, but I am open to learning something new.

So how are you recommending users develop NR Synthetics scripted browser monitors? Specific toolchain? Language?

Thanks!

Hi, @chris.trotter: If you haven’t already, please check out our introduction to writing scripted browser monitors.

Synthetics scripted browser monitors use Selenium Webdriver with the JavaScript bindings. You may find the following resources helpful in learning how to write Selenium tests in JavaScript:

Note that these articles assume that you will be running Selenium on your local machine; Synthetics has Selenium and node.js pre-installed, so you can ignore the parts about installing Selenium.

If you have additional questions as you write your scripts, please feel free to post them to the Synthetics Scripts topic of the New Relic Community Forum.

Thanks, Phil, I’ll spend some time going through all that.

You could also use my templates as a basis to build your knowledge of the Synthetics scripts or give you a quick start.

Maintenance window workaround
API Synthetic maintenance window workaround

If you haven’t seen it already take a look at the New Relic plugin for SE-Builder. It may be very possible that you could simply convert your existing work to Synthetics with a few clicks and maybe a small change here and there.

Yeah, that’s what I’ve been using, but it’s unsupported, so I wanted to approach our Synthetics in such a way that support would be able to assist me without feeling my process was all sneaky like.

The se-builder process I’ve found is also a little tricky because some items are missing from the selection menu. For example, the set-screen-size feature is different from what Synthetics supports, so you have to leave that out and manually add something in. Makes for a somewhat less-than-fluid development process.

All it is is a translator. It does save a lot of time. Its clearly open source so if you want it to format things differently or you don’t want the logging etc you can simply modify it. There is nothing sneaky about it. It just generates code. Support would support you on any code it generates.

If you wanted to always include a set window size for your scripts you could add it in the plugin so when you convert its always there.

Of course, if you know how to code the synthetics manually its better in the long run, but using the se-builder is crazy fast. Once you know the basic things you need to modify in your scripts to make the synthetics work with your application its simple.

1 Like