Skip to content

Commit

Permalink
Fixed error with indexed params
Browse files Browse the repository at this point in the history
  • Loading branch information
mishamyte committed Aug 17, 2021
1 parent 6901365 commit 53bdfaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Serilog.Sinks.Grafana.Loki/LokiBatchFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private Dictionary<string, string> GenerateLabels(LogEvent logEvent)
// to turn them into valid label keys and at the same time denote them as ordinal parameters.
if (char.IsDigit(key[0]))
{
key = $"Param-{key}";
key = $"param{key}";
}

// Some enrichers generates extra quotes and it breaks the payload
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"streams":[{"stream":{"Param-0":"Namespace.Module.Method"},"values":[["<unixepochinnanoseconds>","An error occured in \u0022Namespace.Module.Method\u0022"]]}]}
{"streams":[{"stream":{"param0":"Namespace.Module.Method"},"values":[["<unixepochinnanoseconds>","An error occured in \u0022Namespace.Module.Method\u0022"]]}]}

0 comments on commit 53bdfaf

Please sign in to comment.