Skip to content

Commit 53bdfaf

Browse files
committed
Fixed error with indexed params
1 parent 6901365 commit 53bdfaf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Serilog.Sinks.Grafana.Loki/LokiBatchFormatter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private Dictionary<string, string> GenerateLabels(LogEvent logEvent)
160160
// to turn them into valid label keys and at the same time denote them as ordinal parameters.
161161
if (char.IsDigit(key[0]))
162162
{
163-
key = $"Param-{key}";
163+
key = $"param{key}";
164164
}
165165

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

0 commit comments

Comments
 (0)