Skip to main content
net8.0.NETStandard2.0

This is the Azure.Analytics.OnlineExperimentation client library for developing .NET applications with rich experience.

Published
Jun 11, 2025
1y ago
Total Downloads
873
873

Install

dotnet add package Azure.Analytics.OnlineExperimentation --version 1.0.0-beta.1
ProductVersions
.NET
net8.0
.NET Standard
netstandard2.0

README

Azure Online Experimentation client library for .NET

Azure Online Experimentation is a managed service that enables developers to create and manage experiment metrics for evaluating online A/B tests.

Source code | API reference documentation | Product documentation | Samples

Getting started

Install the package

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

dotnet add package Azure.Analytics.OnlineExperimentation --prerelease

Prerequisites

You need an Azure subscription with an Azure Online Experimentation workspace resource.

Authenticate 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());

Select a service API version

You can explicitly select a supported service API version when instantiating a client:

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

Always ensure that the chosen API version is fully supported and operational for your specific use case and aligns with the service's versioning policy.

Key concepts

The Azure Online Experimentation client library provides the following key classes:

  • OnlineExperimentationClient: Main client class for interacting with the service.
  • DiagnosticDetail: Represents diagnostic details for experiment metrics.

Thread safety

All client instances are thread-safe. It's recommended to reuse client instances across threads.

Additional concepts

Client options | Accessing the response | Handling failures | Diagnostics

Examples

Explore common scenarios using the samples:

Troubleshooting

Common exceptions include:

  • RequestFailedException: Indicates a failure in the request. Inspect the exception message and status code for details.

Enable logging and diagnostics to debug issues:

var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT"));
var options = new OnlineExperimentationClientOptions()
{
    Diagnostics =
    {
        IsLoggingContentEnabled = true
    }
};
var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential(), options);

Next steps

Contributing

See CONTRIBUTING.md for details on contributing to this library.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

This version is marked prerelease. Validate its API and upgrade path before production use.Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.