Share via

Azure.Analytics.OnlineExperimentation samples for .NET

Azure Online Experimentation is a service that helps you manage and analyze experiments in your online applications. The service provides capabilities for defining and tracking metrics, setting up experiments, and analyzing results.

Getting started

Install the package

Install the Azure Online Experimentation client library for .NET with NuGet:

dotnet add package Azure.Analytics.OnlineExperimentation

Initialize the client

The Azure Online Experimentation client library initialization requires two parameters:

var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT"));
var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential());

Samples

These code samples show common scenarios with the Azure Online Experimentation client library.

Sample Description
Initializing the Client Initialize the client with different options.
Creating Experiment Metrics Create various types of metrics synchronously.
Creating Experiment Metrics Asynchronously Create various types of metrics asynchronously.
Validating Experiment Metrics Validate metric definitions before creating them.
Validating Experiment Metrics Asynchronously Validate metric definitions asynchronously.
Retrieving and Listing Metrics Retrieve a specific metric or list all metrics.
Retrieving and Listing Metrics Asynchronously Retrieve or list metrics asynchronously.
Updating an Experiment Metric Update properties of an existing metric.
Updating an Experiment Metric Asynchronously Update properties of an existing metric asynchronously.
Deleting an Experiment Metric Delete a metric when it's no longer needed.
Deleting an Experiment Metric Asynchronously Delete a metric asynchronously.