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 goccy, glad to see your dynamic filter feature perfectly meets what we need in our JSON log situation.
What we face is, we have a lot of huge thrift-generated request/response structs that we cannot control how to dump as JSON. But with dynamic filter feature, we may drastically shrink our logs and reduce performance loss.
However, seems like it only supports pure nested struct data model, I've found that if value.Filter() is chained through SliceCode and MapCode, it could handle slice layers and map layers properly.
As you said, regarding map, it seems that it can be handled by implementing Filter. You can do the same with slice , but you have to think about how the user will specify the elements of slice. Currently, it is specified based on the ( struct's ) field name.
Hi goccy, glad to see your dynamic filter feature perfectly meets what we need in our JSON log situation.
What we face is, we have a lot of huge thrift-generated request/response structs that we cannot control how to dump as JSON. But with dynamic filter feature, we may drastically shrink our logs and reduce performance loss.
However, seems like it only supports pure nested struct data model, I've found that if
value.Filter()
is chained throughSliceCode
andMapCode
, it could handle slice layers and map layers properly.With that said, when query is set as
"XA"
, a JSON like[{"XA":1,"XB":2}]
will be serialized as[{"XA":1}]
.So, do you think it's reasonable to allow query apply on slice value and map value? Maybe I can fire a pull request for this.
The text was updated successfully, but these errors were encountered: