-
Notifications
You must be signed in to change notification settings - Fork 37
Breaking changes
Mykhailo Shevchuk edited this page May 25, 2021
·
12 revisions
- Deprecated dependency
Serilog.Sinks.Http
- Replaced
IHttpClient
withILokiHttpClient
Migration guide: You will have to migrate your code if you've implemented your own version ofILokiHttpClient
. The signature of methodILokiHttpClient.PostAsync
(before upgradeIHttpClient.PostAsync
has changed from Task PostAsync(string, HttpContent) to Task PostAsync(string, Stream).
Before upgrade:
public class CustomLokiHttpClient : IHttpClient
{
// Code removed for brevity...
public async Task<HttpResponseMessage> PostAsync(string requestUri, HttpContent content)
{
// Here you probably have some code updating the content,
// and then you send the request
return await httpClient.PostAsync(requestUri, content)
}
}
After update:
public class CustomLokiHttpClient : ILokiHttpClient
{
// Code removed for brevity...
public async Task<HttpResponseMessage> PostAsync(string requestUri, Stream contentStream)
{
using var content = new StreamContent(contentStream);
// Here you probably have some code updating the content,
// and then you send the request
return await httpClient.PostAsync(requestUri, content)
}
}
- Removed
DurableGrafanaLokiUsingTimeRolledBuffers
andDurableGrafanaLokiUsingFileSizeRolledBuffers
- Replaced
excludedLabels
withfiltrationMode
andfiltrationLabels