datalust / seq-tickets

Issues, design discussions and feature roadmap for the Seq log server
https://datalust.co/seq
98 stars 5 forks source link

Root level properties of complex objects will be shown as seperate data fields #2094

Closed kechf closed 9 months ago

kechf commented 9 months ago

Describe the bug After seq 2024.1 update, sometimes the root level properties of complex objects will be shown as seperate data fields in the seq events, instead of a whole json object.

To Reproduce This issue occurrs after the seq upgrade from version 2023.x to 2024.1 We doesn't changed anything in the code. We use always the serilog framework in connection with @ destructuring operator to log complex objects as json.

Expected behavior We expect, that complex objects in connection with the destructuring operator in serilog will be shown as json data field in the log events.

Screenshots Seq_issue

Environment (please complete the following information):

nblumhardt commented 9 months ago

Hi! Thanks for reaching out. You can switch this back to the old layout in user preferences, by deselecting "Flatten event properties view" - some more details and a screenshot in #2091. Does this help?

kechf commented 9 months ago

Hi Nicholas, thanks for your quick answer! After updating my preferences and clearing my local browser cache, it seems to be solved now. Good to know! Thanks.

ryanbuening commented 9 months ago

We ran into this too and thought it was strange. It's a little confusing that "Flatten" was made to be the default. Especially when upgrading from 2023.x to 2024.x.

Also of note, when Flatten is selected, it doesn't appear to affect all nested properties as shown below. I'm not sure if that is expected or not.

image

liammclennan commented 9 months ago

For future reference https://blog.datalust.co/nested-event-properties/

jdlegan commented 9 months ago

@liammclennan @nblumhardt Is there a way to turn this off at the server level? This caused is quite a bit of troubleshooting as a company which has been using Seq and Serilog for almost seven years. Very undesirable impact and now that we know the root cause, which is great, I do not want every new user to have to turn it off as the second step to all of the Seq instances they log into.

liammclennan commented 9 months ago

Hi @jdlegan, it is possible to disable flattening for all users using the api endpoint: PUT api/users/{id}. https://docs.datalust.co/docs/server-http-api#apiusers

jdlegan commented 9 months ago

@liammclennan is that for all our existing users or will this set the default setting for new users who are added via Azure AAD SSO integration?

liammclennan commented 9 months ago

@jdlegan PUT api/users/{id} is the endpoint to update an existing user.

liammclennan commented 9 months ago

@ryanbuening the flattening stops when it reaches an array, because there is no nice way to flatten an array.