open-telemetry / opentelemetry-collector-contrib

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

[pkg/ottl] Enhance ParseXML function with intuitive parse format and add MarshalXML function to convert parsed output back to XML #35076

Open shazlehu opened 1 week ago

shazlehu commented 1 week ago

Component(s)

pkg/ottl

Is your feature request related to a problem? Please describe.

The current implementation of the ParseXML produces output that is difficult for users to manipulate, particularly when the XML is complicated. The current design loses the sense of key:value pairs which is helpful for understanding the data, and, more importantly, parses the XML into arrays, which are difficult to manipulate in OTTL, and don't provide a stable path that can be used to access the data.

Describe the solution you'd like

PR 35210 has a proposed new parsing version that maintains backward compatibility with the current implementation. (Updated to point to PR off observIQ repo)

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 1 week ago

Pinging code owners:

djaglowski commented 5 days ago

For context, discussion about the current design can be found on #31133.

djaglowski commented 5 days ago

I'm going to make a few comments on #35210 but I think it's going to be worth bringing the discussion back here to focus on proposed changes to the format.