serilog-sinks-elasticsearch icon indicating copy to clipboard operation
serilog-sinks-elasticsearch copied to clipboard

When FormatStackTraceAsArray is enabled, stack trace is duplicated in the RemoteStackTrace field

Open skajfes opened this issue 4 years ago • 0 comments
trafficstars

Does this issue relate to a new feature or an existing bug?

  • [x] Bug
  • [ ] New Feature

What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package. 8.4.1

What is the target framework and operating system? See target frameworks & net standard matrix.

  • [ ] netCore 2.0
  • [ ] netCore 1.0
  • [x] 4.7
  • [ ] 4.6.x
  • [ ] 4.5.x

Please describe the current behavior? When FormatStackTraceAsArray option is enabled any exception that is logged ends up having the stack trace duplicated in StackTrace and RemoteStackTrace properties.

Please describe the expected behavior? Expected behavior is to have the stack trace be in StackTrace property, and remote stack trace in the RemoteStackTrace property on the logged document.

If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem

  • setup serilog elastic sink with FormatStackTraceAsArray option enabled
  • log an exception
  • exception in elastic has two identical properties: StackTrace and RemoteStackTrace

skajfes avatar Apr 20 '21 13:04 skajfes