Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly support scalar and other Serilog log property values when parsing to string #256

Closed
stijnmoreels opened this issue Dec 9, 2021 · 0 comments · Fixed by #262
Closed
Assignees
Labels
application-insights All issues related to Azure Application Insights bug Something isn't working enhancement New feature or request good first issue Good for newcomers serilog All issues related to Serilog
Milestone

Comments

@stijnmoreels
Copy link
Member

stijnmoreels commented Dec 9, 2021

Describe the bug
When converting the Serilog values to Azure Application Insights models, we have a .ToDecentString method that takes in the Serilog log property value and returns the simple string representation of that value.
This works for simple values, but more complex values (like JSON values), this will result in escaped characters.

To Reproduce
Add a telemetry context to any logging extension method with a JSON value.

Expected behavior
The end-result Azure Application Insights telemetry value should contain the original JSON value (unescaped).

Additional context

@stijnmoreels stijnmoreels added bug Something isn't working enhancement New feature or request application-insights All issues related to Azure Application Insights serilog All issues related to Serilog labels Dec 9, 2021
@stijnmoreels stijnmoreels added this to the v2.4.0 milestone Dec 9, 2021
@stijnmoreels stijnmoreels added the good first issue Good for newcomers label Dec 20, 2021
@stijnmoreels stijnmoreels self-assigned this Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application-insights All issues related to Azure Application Insights bug Something isn't working enhancement New feature or request good first issue Good for newcomers serilog All issues related to Serilog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant