The Full Stack Developer Guide Developer Hub

Welcome to the Full Stack Developer Guide developer hub. You'll find comprehensive guides and documentation to help you start working with the Full Stack Developer Guide as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Set up New Relic

This integration allows you to associate an Optimizely feature flag, variation or experiment with New Relic performance data.

You can track and monitor the New Relic data and additonally segment the experiences delivered by Optimizely.

Using Optimizely’s notification listeners, you can forward events that occur in the SDK using your New Relic custom attributes.

In the example code below, we add a call to New Relic in the activate callback function. This can be placed directly after initializing the Optimizely client. This assumes a New Relic object is in scope.

const optimizely = require('@optimizely/optimizely-sdk');
const optimizelyEnums = require('@optimizely/optimizely-sdk/lib/utils/enums');
const newrelic = require('newrelic');

function onActivate(activateObject) {
    'optimizely_segment': `${activateObject.experiment['key']} - ${activateObject.variation['key']}`;

// Add a ACTIVATE notification listener
let activateId = optly.notificationCenter.addNotificationListener(
from optimizely.notification_center import NotificationCenter
from optimizely.helpers import enums
import newrelic

def on_activate(experiment, user_id, attributes, variation, event):
        # Create newrelic instance
	newrelic_obj.agent.add_custom_parameter(optimizely_segment, '{}-{}'.format(experiment.key, variation.key))

opt_obj.notification_center.add_notification_listener(enums.NotificationTypes.ACTIVATE, on_activate)


This integration currently doesn't support rollouts.