You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
`
I have problem with single quotes. In code you replace all """ to "'". Can you please make this replace optional. I need just empty string for this. Because for example enum.SomeValue convert to "SomeValue", but string "SomeValue" to "'SomeValue'" and it's not looks like good.
I solved my problem with ILogEventEnricher and LogEventPropertyValue inherit my log event property from ScalarValue and override Render. But with parameter in appsettings.json will be better.
When you add global property in Lables in appsettings.json it looks good without escape single quotes.
When you use Enrich.WithProperty with runtime values it has single quotes escape.
So you could see that there are no single quotes here. Detected fileds are in double quoutes and when it is parsed to labels by a | json parser, there are no quotes remaining.
For this test I used Serilog.Sinks.Grafana.Loki v8.0.0, Grafana v9.1.6 and Loki v2.6.1
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi.
`
I have problem with single quotes. In code you replace all """ to "'". Can you please make this replace optional. I need just empty string for this. Because for example enum.SomeValue convert to "SomeValue", but string "SomeValue" to "'SomeValue'" and it's not looks like good.
I solved my problem with ILogEventEnricher and LogEventPropertyValue inherit my log event property from ScalarValue and override Render. But with parameter in appsettings.json will be better.
Thank you.
All reactions