open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.11k stars 2.39k forks source link

JSON Parser - Hierarchy Depth #34942

Open LauraMaassen opened 3 months ago

LauraMaassen commented 3 months ago

Is your feature request related to a problem? Please describe. When I use the filelog receiver and parse a json field with the json_parser operator, I often only want to parse the toplevel json keys instead of a full recursive parsing. The problem is that a deeply nested json field can produce a large number of parsed field columns, which might not be suitable for tools like opensearch.

Describe the solution you'd like I would appriciate a configuration field on the desired parsing depth. The default could still be infinity.

Describe alternatives you've considered I considered using the transform processor to convert json objects in lower depth into lists and parse them then with the json parser. But I think this is way to complicated.

breedx-splk commented 3 months ago

Hi @LauraMaassen I think you might have intended to open this issue on the collector-contrib repo? I will see if we can have it transferred. Thanks.

github-actions[bot] commented 3 weeks ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.