Skip to content

Releases: serilog-contrib/serilog-sinks-grafana-loki

v8.0.0-beta.0

01 Apr 21:16
619511e

Choose a tag to compare

v8.0.0-beta.0 Pre-release
Pre-release

Implemented:

Breaking changes:

  • LokiJsonTextFormatter is used as a default text formatter. Removed property outputTemplate
  • Removed interface ILabelAwareTextFormatter
  • Redesigned approach of mapping properties to labels: removed filtrationMode and filtrationLabels, added propertiesAsLabels
  • Properties, mapped to the labels won't be passed to the text formatter
  • Redesigned behavior of log level data (level label): removed createLevelLabel
  • Added IReservedPropertyRenamingStrategy and reservedPropertyRenamingStrategy configuration property

v7.1.1

23 Mar 22:09
71e8bd5

Choose a tag to compare

v7.1.0

21 Sep 20:42
a381464

Choose a tag to compare

v7.1.0-beta.0

09 Sep 22:03
0e09c63

Choose a tag to compare

v7.0.2

30 Aug 14:50
30aa016

Choose a tag to compare

v7.0.1

17 Aug 17:10

Choose a tag to compare

v7.0.0

15 Aug 17:21

Choose a tag to compare

Implemented:

Breaking changes:

  • Now level label is not created by default

To keep previous behavior set createLevelLabel to true at sink configuration

 .WriteTo.GrafanaLoki(
                    "http://localhost:3100",
                    createLevelLabel: true)
{
    "Name": "GrafanaLoki",
     "Args": {
         "uri": "http://localhost:3100",
         "createLevelLabel": true
     }
}

v6.0.1

07 Jun 16:45
18a3dba

Choose a tag to compare

v6.0.0

02 Jun 13:27
f01dbae

Choose a tag to compare

Implemented:

Breaking changes:

  • Deprecated dependency Serilog.Sinks.Http
  • Replaced IHttpClient with ILokiHttpClient
    Migration guide:
    You will have to migrate your code if you've implemented your own version of ILokiHttpClient. The signature of method ILokiHttpClient.PostAsync (before upgrade IHttpClient.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)
  }
}

v6.0.0-beta.0

25 May 17:21
9bfc67d

Choose a tag to compare

v6.0.0-beta.0 Pre-release
Pre-release

Implemented:

Breaking changes:

  • Deprecated dependency Serilog.Sinks.Http
  • Replaced IHttpClient with ILokiHttpClient
    Migration guide:
    You will have to migrate your code if you've implemented your own version of ILokiHttpClient. The signature of method ILokiHttpClient.PostAsync (before upgrade IHttpClient.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)
  }
}