Skip to content

Commit

Permalink
fix: send default buckets instead of null metrics buckets as they cau…
Browse files Browse the repository at this point in the history
…se 400s (#267)
  • Loading branch information
daveleek authored Dec 10, 2024
1 parent 2033c7d commit 465b2dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Unleash/Communication/UnleashApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public async Task<bool> SendMetrics(Yggdrasil.MetricsBucket metrics, Cancellatio
{
AppName = clientRequestHeaders.AppName,
InstanceId = clientRequestHeaders.InstanceTag,
Bucket = metrics
Bucket = metrics ?? new Yggdrasil.MetricsBucket(new Dictionary<string, Yggdrasil.FeatureCount>(), DateTimeOffset.UtcNow, DateTimeOffset.UtcNow)
};

using (var request = new HttpRequestMessage(HttpMethod.Post, requestUri))
Expand Down

0 comments on commit 465b2dd

Please sign in to comment.