Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Flagsmith.Client.Test/AnalyticsProcessorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ internal class AnalyticsProcessorTest : AnalyticsProcessor
/// <summary>
/// This class provides some extra functionality to help particularly in unit testing.
/// </summary>
public AnalyticsProcessorTest(HttpClient httpClient, string environmentKey, string baseApiUrl, int timeOut = 3)
: base(httpClient, environmentKey, baseApiUrl, timeOut: timeOut)
public AnalyticsProcessorTest(HttpClient httpClient, string environmentKey, Uri analyticsUri, int timeOut = 3)
: base(httpClient, environmentKey, analyticsUri, timeOut: timeOut)
{
}
/// <summary>
Expand Down
79 changes: 72 additions & 7 deletions Flagsmith.Client.Test/AnalyticsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ namespace Flagsmith.FlagsmithClientTest
{
public class AnalyticsTests
{
const string _defaultApiUrl = "https://edge.api.flagsmith.com/api/v1/";
static readonly Uri _defaultApiUri = new Uri("https://edge.api.flagsmith.com/api/v1/");
static readonly Uri _defaultAnalyticsUri = new Uri(_defaultApiUri, "analytics/flags/");

[Fact]
public async Task TestAnalyticsProcessorDoesNotThrowUnderLoad()
Expand All @@ -27,7 +28,7 @@ public async Task TestAnalyticsProcessorDoesNotThrowUnderLoad()
HttpMocker.PayloadsSubmitted = new System.Collections.Concurrent.ConcurrentBag<string>();

var mockHttpClient = HttpMocker.MockHttpResponse(System.Net.HttpStatusCode.OK, null, true);
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, null);
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, _defaultAnalyticsUri);
var token = new CancellationToken();
await Parallel.ForEachAsync(Enumerable.Range(1, numberOfThreads), token, async (item, token) =>
{
Expand Down Expand Up @@ -69,7 +70,7 @@ public async Task TestAnalyticsProcessorFlushClearsAnalyticsData()
{
StatusCode = System.Net.HttpStatusCode.OK,
});
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, null);
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, _defaultAnalyticsUri);
await analyticsProcessor.TrackFeature("TestAnalyticsProcessorFlushClearsAnalyticsDataFeature");
await analyticsProcessor.Flush();
Assert.False(analyticsProcessor.HasTrackingItemsInCache());
Expand All @@ -81,7 +82,7 @@ public async void TestAnalyticsProcessorFlushPostRequestDataMatchAnanlyticsData(
{
StatusCode = System.Net.HttpStatusCode.OK,
});
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, baseApiUrl: _defaultApiUrl);
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, analyticsUri: _defaultAnalyticsUri);
await analyticsProcessor.TrackFeature("TestAnalyticsProcessorFlushPostRequestDataMatchAnanlyticsDataFeature1");
await analyticsProcessor.TrackFeature("TestAnalyticsProcessorFlushPostRequestDataMatchAnanlyticsDataFeature2");
var jObject = JObject.Parse(analyticsProcessor.ToString());
Expand All @@ -91,13 +92,77 @@ public async void TestAnalyticsProcessorFlushPostRequestDataMatchAnanlyticsData(
Assert.Equal(1, jObject["TestAnalyticsProcessorFlushPostRequestDataMatchAnanlyticsDataFeature2"].Value<int>());
}
[Fact]
public async Task TestAnalyticsProcessorPostsToConfiguredAnalyticsUri()
{
var mockHttpClient = HttpMocker.MockHttpResponse(new HttpResponseMessage
{
StatusCode = System.Net.HttpStatusCode.OK,
});
var analyticsUri = new Uri("https://analytics.example.com/api/v1/analytics/flags/");
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, Fixtures.ApiKey, analyticsUri);
await analyticsProcessor.TrackFeature("some_feature");
await analyticsProcessor.Flush();
mockHttpClient.Verify(x => x.SendAsync(
It.Is<HttpRequestMessage>(req => req.Method == HttpMethod.Post && req.RequestUri == analyticsUri),
It.IsAny<CancellationToken>()), Times.Once);
}
[Fact]
public async Task TestAnalyticsProcessorBaseApiUrlConstructorPostsToAnalyticsEndpoint()
{
var mockHttpClient = HttpMocker.MockHttpResponse(new HttpResponseMessage
{
StatusCode = System.Net.HttpStatusCode.OK,
});
var analyticsProcessor = new AnalyticsProcessor(mockHttpClient.Object, Fixtures.ApiKey, _defaultApiUri.ToString());
await analyticsProcessor.TrackFeature("some_feature");
await analyticsProcessor.Flush();
VerifyAnalyticsPostedTo(mockHttpClient, _defaultAnalyticsUri);
}
[Fact]
public async Task TestFlagsmithClientPostsAnalyticsToExpectedUri()
{
var customAnalyticsUri = new Uri("https://analytics.example.com/api/v1/analytics/flags/");
// A client using the default analytics endpoint, relative to the API URI...
var (defaultUriMock, defaultUriFlags) = await GetClientFlags(analyticsUri: null);
// ...and a client with an analytics endpoint configured separately from the API URI
var (customUriMock, customUriFlags) = await GetClientFlags(customAnalyticsUri);
await Task.Delay(11 * 1000);
await defaultUriFlags.IsFeatureEnabled("some_feature");
await customUriFlags.IsFeatureEnabled("some_feature");
// Tracking a feature does not await the flush it triggers, so give the requests time to be made
await Task.Delay(2 * 1000);
VerifyAnalyticsPostedTo(defaultUriMock, _defaultAnalyticsUri);
VerifyAnalyticsPostedTo(customUriMock, customAnalyticsUri);
}
private static async Task<(Mock<HttpClient>, IFlags)> GetClientFlags(Uri analyticsUri)
{
var mockHttpClient = HttpMocker.MockHttpResponse(new HttpResponseMessage
{
StatusCode = System.Net.HttpStatusCode.OK,
Content = new StringContent(Fixtures.ApiFlagResponse)
});
var client = new FlagsmithClient(new FlagsmithConfiguration
{
EnvironmentKey = Fixtures.ApiKey,
ApiUri = _defaultApiUri,
AnalyticsUri = analyticsUri,
HttpClient = mockHttpClient.Object,
EnableAnalytics = true
});
return (mockHttpClient, await client.GetEnvironmentFlags());
}
private static void VerifyAnalyticsPostedTo(Mock<HttpClient> mockHttpClient, Uri expectedUri)
=> mockHttpClient.Verify(x => x.SendAsync(
It.Is<HttpRequestMessage>(req => req.Method == HttpMethod.Post && req.RequestUri == expectedUri),
It.IsAny<CancellationToken>()), Times.Once);
[Fact]
public async Task TestAnalyticsProcessorFlushEarlyExitIfAnalyticsDataIsEmpty()
{
var mockHttpClient = HttpMocker.MockHttpResponse(new HttpResponseMessage
{
StatusCode = System.Net.HttpStatusCode.OK,
});
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, baseApiUrl: _defaultApiUrl);
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, analyticsUri: _defaultAnalyticsUri);
await analyticsProcessor.Flush();
mockHttpClient.Verify(x => x.SendAsync(It.IsAny<HttpRequestMessage>(), It.IsAny<CancellationToken>()), Times.Never);
}
Expand All @@ -108,7 +173,7 @@ public async Task TestAnalyticsProcessorCallingTrackFeatureCallsFlushWhenTimerRu
{
StatusCode = System.Net.HttpStatusCode.OK,
});
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, baseApiUrl: _defaultApiUrl);
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, analyticsUri: _defaultAnalyticsUri);
await Task.Delay(12 * 1000);
await analyticsProcessor.TrackFeature("TestAnalyticsProcessorCallingTrackFeatureCallsFlushWhenTimerRunsOutFeature");
mockHttpClient.VerifyHttpRequest(HttpMethod.Post, "/api/v1/analytics/flags/", Times.Once);
Expand All @@ -122,7 +187,7 @@ public async Task TestAnalyticsProcessorDataConcurrentAccess()
{
StatusCode = System.Net.HttpStatusCode.OK,
});
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, null);
var analyticsProcessor = new AnalyticsProcessorTest(mockHttpClient.Object, null, _defaultAnalyticsUri);
const int numberOfCalls = 100000;

// When
Expand Down
4 changes: 3 additions & 1 deletion Flagsmith.Client.Test/Fixtures.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using FlagsmithEngine.Environment.Models;
Expand All @@ -10,7 +11,8 @@ internal class Fixtures
{
public static string ApiKey => "ser.test_key";
public static string ApiUrl => "http://test_url/";
public static AnalyticsProcessorTest GetAnalyticalProcessorTest() => new(new HttpClient(), ApiKey, ApiUrl);
public static Uri AnalyticsUri => new Uri(ApiUrl + "analytics/flags/");
public static AnalyticsProcessorTest GetAnalyticalProcessorTest() => new(new HttpClient(), ApiKey, AnalyticsUri);
public static JObject JsonObject = JObject.Parse(@"{
'api_key': 'test_key',
'name': 'Test Environment',
Expand Down
2 changes: 1 addition & 1 deletion Flagsmith.Client.Test/UserAgentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public async Task TestUserAgentHeaderIsSentInAnalyticsFlush()
var analyticsProcessor = new AnalyticsProcessor(
httpClientMock.Object,
Fixtures.ApiKey,
Fixtures.ApiUrl
Fixtures.AnalyticsUri
);

// When
Expand Down
11 changes: 8 additions & 3 deletions Flagsmith.FlagsmithClient/AnalyticsProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class AnalyticsProcessor : IAnalyticsProcessor

private int _FlushIntervalSeconds = 10;
private readonly DisposableLock _lock = new DisposableLock();
private readonly string _AnalyticsEndPoint;
private readonly Uri _AnalyticsUri;
private readonly string _EnvironmentKey;
private readonly int _TimeOut;
private DateTime _LastFlushed;
Expand All @@ -28,9 +28,14 @@ public class AnalyticsProcessor : IAnalyticsProcessor
private ConcurrentDictionary<string, Dictionary<string, int>> AnalyticsDataThreads;

public AnalyticsProcessor(HttpClient httpClient, string environmentKey, string baseApiUrl, ILogger logger = null, Dictionary<string, string> customHeaders = null, int timeOut = 3, int flushIntervalSeconds = 10)
: this(httpClient, environmentKey, new Uri(baseApiUrl + "analytics/flags/", UriKind.RelativeOrAbsolute), logger, customHeaders, timeOut, flushIntervalSeconds)
{
}

public AnalyticsProcessor(HttpClient httpClient, string environmentKey, Uri analyticsUri, ILogger logger = null, Dictionary<string, string> customHeaders = null, int timeOut = 3, int flushIntervalSeconds = 10)
{
_EnvironmentKey = environmentKey;
_AnalyticsEndPoint = baseApiUrl + "analytics/flags/";
_AnalyticsUri = analyticsUri;
_TimeOut = timeOut;
_LastFlushed = DateTime.UtcNow;
_HttpClient = httpClient;
Expand Down Expand Up @@ -71,7 +76,7 @@ private async Task FlushWithoutLock()
try
{
var analyticsJson = JsonConvert.SerializeObject(GetAggregatedAnalyticsWithoutLock());
var request = new HttpRequestMessage(HttpMethod.Post, _AnalyticsEndPoint)
var request = new HttpRequestMessage(HttpMethod.Post, _AnalyticsUri)
{
Headers =
{
Expand Down
2 changes: 1 addition & 1 deletion Flagsmith.FlagsmithClient/FlagsmithClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private void Initialise()
throw new Exception("ValueError: environmentKey is required");
}
if (_config.EnableAnalytics)
_analyticsProcessor = new AnalyticsProcessor(_config.HttpClient, _config.EnvironmentKey, _config.ApiUri.ToString(), _config.Logger, _config.CustomHeaders);
_analyticsProcessor = new AnalyticsProcessor(_config.HttpClient, _config.EnvironmentKey, _config.AnalyticsUri ?? new Uri(_config.ApiUri, "analytics/flags/"), _config.Logger, _config.CustomHeaders);

if (_config.EnableLocalEvaluation)
{
Expand Down
8 changes: 8 additions & 0 deletions Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,18 @@
/// </summary>
public Uri ApiUri { get; set; } = DefaultApiUri;

/// <summary>
/// URI of the Flagsmith analytics events API endpoint. Set this when analytics are not served by the same
/// API as flags, e.g. when using Edge Proxy. Defaults to the <c>analytics/flags/</c> endpoint relative to
/// <see cref="ApiUri"/>.
/// <example><code>new Uri("https://flagsmith.example.com/api/v1/analytics/flags/")</code></example>
/// </summary>
public Uri? AnalyticsUri { get; set; }

/// <summary>
/// The environment key obtained from Flagsmith interface.
/// </summary>
public string EnvironmentKey { get; set; }

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 9.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 10.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 33 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 9.0)

Non-nullable property 'EnvironmentKey' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

/// <summary>
/// Enables local evaluation of flags.
Expand All @@ -42,7 +50,7 @@
/// <summary>
/// Provide logger for logging polling info & errors which is only applicable when client side evalution is enabled and analytics errors.
/// </summary>
public ILogger Logger { get; set; }

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 9.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 10.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 53 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 9.0)

Non-nullable property 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

/// <summary>
/// if enabled, sends additional requests to the Flagsmith API to power flag analytics charts.
Expand All @@ -66,7 +74,7 @@
/// <summary>
/// Additional headers to add to requests made to the Flagsmith API
/// </summary>
public Dictionary<string, string> CustomHeaders { get; set; }

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 9.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 10.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Engine)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.FlagsmithClient)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.EngineTest)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Check Build and formatting (Flagsmith.Client.Test)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 7.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 6.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 8.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

Check warning on line 77 in Flagsmith.FlagsmithClient/FlagsmithConfiguration.cs

View workflow job for this annotation

GitHub Actions / Test (Flagsmith.Client.Test, 9.0)

Non-nullable property 'CustomHeaders' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable.

/// <summary>
/// If enabled, the SDK will cache the flags for the duration specified in the CacheConfig
Expand Down
Loading